diff --git a/pillar/api/node_types/__init__.py b/pillar/api/node_types/__init__.py index 2aa26bc0..ebd9cfce 100644 --- a/pillar/api/node_types/__init__.py +++ b/pillar/api/node_types/__init__.py @@ -9,7 +9,7 @@ _file_embedded_schema = { ATTACHMENT_SLUG_REGEX = '[a-zA-Z0-9_ ]+' -_attachments_embedded_schema = { +attachments_embedded_schema = { 'type': 'dict', # TODO: will be renamed to 'keyschema' in Cerberus 1.0 'propertyschema': { diff --git a/pillar/api/node_types/asset.py b/pillar/api/node_types/asset.py index 4409e98f..407ab05e 100644 --- a/pillar/api/node_types/asset.py +++ b/pillar/api/node_types/asset.py @@ -1,4 +1,4 @@ -from pillar.api.node_types import _file_embedded_schema, _attachments_embedded_schema +from pillar.api.node_types import _file_embedded_schema, attachments_embedded_schema node_type_asset = { 'name': 'asset', @@ -27,7 +27,7 @@ node_type_asset = { # We point to the original file (and use it to extract any relevant # variation useful for our scope). 'file': _file_embedded_schema, - 'attachments': _attachments_embedded_schema, + 'attachments': attachments_embedded_schema, # Tags for search 'tags': { 'type': 'list', diff --git a/pillar/api/node_types/page.py b/pillar/api/node_types/page.py index 9e11f533..b6a22f90 100644 --- a/pillar/api/node_types/page.py +++ b/pillar/api/node_types/page.py @@ -1,4 +1,4 @@ -from pillar.api.node_types import _attachments_embedded_schema +from pillar.api.node_types import attachments_embedded_schema node_type_page = { 'name': 'page', @@ -15,7 +15,7 @@ node_type_page = { 'url': { 'type': 'string' }, - 'attachments': _attachments_embedded_schema, + 'attachments': attachments_embedded_schema, }, 'form_schema': { 'attachments': {'visible': False}, diff --git a/pillar/api/node_types/post.py b/pillar/api/node_types/post.py index a3e07126..91e59805 100644 --- a/pillar/api/node_types/post.py +++ b/pillar/api/node_types/post.py @@ -1,4 +1,4 @@ -from pillar.api.node_types import _attachments_embedded_schema +from pillar.api.node_types import attachments_embedded_schema node_type_post = { 'name': 'post', @@ -26,7 +26,7 @@ node_type_post = { 'url': { 'type': 'string' }, - 'attachments': _attachments_embedded_schema, + 'attachments': attachments_embedded_schema, }, 'form_schema': { 'attachments': {'visible': False}, diff --git a/pillar/cli/maintenance.py b/pillar/cli/maintenance.py index 0a8ade99..396d79d6 100644 --- a/pillar/cli/maintenance.py +++ b/pillar/cli/maintenance.py @@ -424,7 +424,7 @@ def upgrade_attachment_schema(proj_url=None, all_projects=False): from pillar.api.node_types.asset import node_type_asset from pillar.api.node_types.page import node_type_page from pillar.api.node_types.post import node_type_post - from pillar.api.node_types import _attachments_embedded_schema + from pillar.api.node_types import attachments_embedded_schema from pillar.api.utils import remove_private_keys # Node types that support attachments @@ -449,7 +449,7 @@ def upgrade_attachment_schema(proj_url=None, all_projects=False): log.info(' - replacing attachment schema on node type "%s"', nt_name) pillar_nt = nts_by_name[nt_name] - proj_nt['dyn_schema']['attachments'] = copy.deepcopy(_attachments_embedded_schema) + proj_nt['dyn_schema']['attachments'] = copy.deepcopy(attachments_embedded_schema) # Get the form schema the same as the official Pillar one, but only for attachments. try: