Renamed _attachments_embedded_schema to attachments_embedded_schema

It's used in multiple files, and thus shouldn't be marked as 'private'.
This commit is contained in:
Sybren A. Stüvel 2017-06-16 12:39:51 +02:00
parent 50108201cf
commit 6e6ea6082d
5 changed files with 9 additions and 9 deletions

View File

@ -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': {

View File

@ -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',

View File

@ -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},

View File

@ -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},

View File

@ -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: