From a04e62e3e9ed4b664b849401e03e9d8916ac3468 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 19 Apr 2019 11:13:31 +0200 Subject: [PATCH] Rename project_type to category in Project Requires renaming custom_props.cloud.project_type fields to custom_props.cloud.category in all documents of the projects collection. --- cloud/routes.py | 8 ++++---- cloud/setup.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud/routes.py b/cloud/routes.py index c384f7f..cacdf27 100644 --- a/cloud/routes.py +++ b/cloud/routes.py @@ -559,7 +559,7 @@ def project_browse_view_nodes(project: pillarsdk.Project): def project_settings(project: pillarsdk.Project, **template_args: dict): """Renders the project settings page for Blender Cloud projects. - If the project has been setup for Blender Cloud, check for the cloud.project_type + If the project has been setup for Blender Cloud, check for the cloud.category property, to render the proper form. """ @@ -570,9 +570,9 @@ def project_settings(project: pillarsdk.Project, **template_args: dict): cloud_props = project['extension_props'][EXTENSION_NAME] - project_type = cloud_props['project_type'] - if project_type != 'film': - log.error('No interface available to edit %s projects, yet' % project_type) + category = cloud_props['category'] + if category != 'film': + log.error('No interface available to edit %s projects, yet' % category) form = FilmProjectForm() diff --git a/cloud/setup.py b/cloud/setup.py index 5000199..42bf3d8 100644 --- a/cloud/setup.py +++ b/cloud/setup.py @@ -29,7 +29,7 @@ def setup_for_film(project_url): # are already there. all_extension_props = project.setdefault('extension_props', {}) cloud_extension_props = { - 'project_type': 'film', + 'category': 'film', 'theme_css': '', # The accent color (can be 'blue' or '#FFBBAA' or 'rgba(1, 1, 1, 1) 'theme_color': '',