mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
ignore save warnings exception in prepare project
This commit is contained in:
parent
3c1b04a110
commit
71d79a2dc9
2 changed files with 14 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ import json
|
|||
from avalon.api import AvalonMongoDB
|
||||
from openpype.api import ProjectSettings
|
||||
from openpype.lib import create_project
|
||||
from openpype.settings import SaveWarningExc
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
ServerAction,
|
||||
|
|
@ -312,7 +313,6 @@ class PrepareProjectServer(ServerAction):
|
|||
if not in_data:
|
||||
return
|
||||
|
||||
|
||||
root_values = {}
|
||||
root_key = "__root__"
|
||||
for key in tuple(in_data.keys()):
|
||||
|
|
@ -392,7 +392,12 @@ class PrepareProjectServer(ServerAction):
|
|||
else:
|
||||
attributes_entity[key] = value
|
||||
|
||||
project_settings.save()
|
||||
try:
|
||||
project_settings.save()
|
||||
except SaveWarningExc as exc:
|
||||
self.log.info("Few warnings happened during settings save:")
|
||||
for warning in exc.warnings:
|
||||
self.log.info(str(warning))
|
||||
|
||||
# Change custom attributes on project
|
||||
if custom_attribute_values:
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import json
|
|||
from avalon.api import AvalonMongoDB
|
||||
from openpype.api import ProjectSettings
|
||||
from openpype.lib import create_project
|
||||
from openpype.settings import SaveWarningExc
|
||||
|
||||
from openpype_modules.ftrack.lib import (
|
||||
BaseAction,
|
||||
|
|
@ -417,7 +418,12 @@ class PrepareProjectLocal(BaseAction):
|
|||
else:
|
||||
attributes_entity[key] = value
|
||||
|
||||
project_settings.save()
|
||||
try:
|
||||
project_settings.save()
|
||||
except SaveWarningExc as exc:
|
||||
self.log.info("Few warnings happened during settings save:")
|
||||
for warning in exc.warnings:
|
||||
self.log.info(str(warning))
|
||||
|
||||
# Change custom attributes on project
|
||||
if custom_attribute_values:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue