Disallow spaces in attachment slugs
This commit is contained in:
@@ -7,7 +7,7 @@ _file_embedded_schema = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ATTACHMENT_SLUG_REGEX = '[a-zA-Z0-9_ ]+'
|
ATTACHMENT_SLUG_REGEX = '[a-zA-Z0-9_]+'
|
||||||
|
|
||||||
attachments_embedded_schema = {
|
attachments_embedded_schema = {
|
||||||
'type': 'dict',
|
'type': 'dict',
|
||||||
|
@@ -867,6 +867,7 @@ def upgrade_attachment_usage(proj_url=None, all_projects=False, go=False):
|
|||||||
if status != 200:
|
if status != 200:
|
||||||
log.error('Error %i storing altered node %s %s', status, node['_id'], r)
|
log.error('Error %i storing altered node %s %s', status, node['_id'], r)
|
||||||
raise SystemExit('Error storing node; see log.')
|
raise SystemExit('Error storing node; see log.')
|
||||||
|
log.debug('Updated node %s: %s', node['_id'], r)
|
||||||
|
|
||||||
log.info('Project %s (%s) has %d nodes with attachments',
|
log.info('Project %s (%s) has %d nodes with attachments',
|
||||||
proj_url, proj_id, node_count)
|
proj_url, proj_id, node_count)
|
||||||
|
Reference in New Issue
Block a user