formatting changes

This commit is contained in:
iLLiCiTiT 2020-07-10 17:19:48 +02:00
parent 3975c7a0e1
commit fff3c15da0
3 changed files with 10 additions and 7 deletions

View file

@ -1166,7 +1166,9 @@ class SyncToAvalonEvent(BaseEvent):
self.process_session.rolback()
# TODO logging
# TODO report
error_msg = "Failed to store MongoID to entity's custom attribute"
error_msg = (
"Failed to store MongoID to entity's custom attribute"
)
report_msg = (
"{}||SyncToAvalon action may solve this issue"
).format(error_msg)

View file

@ -5,7 +5,7 @@ from .ftrack_event_handler import BaseEvent
from .ftrack_action_handler import BaseAction, statics_icon
from .ftrack_app_handler import AppAction
__all__ = [
__all__ = (
"avalon_sync",
"credentials",
"BaseHandler",
@ -13,4 +13,4 @@ __all__ = [
"BaseAction",
"statics_icon",
"AppAction"
]
)

View file

@ -62,10 +62,11 @@ def check_regex(name, entity_type, in_schema=None, schema_patterns=None):
if not schema_obj:
name_pattern = default_pattern
else:
name_pattern = schema_obj.get(
"properties", {}).get(
"name", {}).get(
"pattern", default_pattern
name_pattern = (
schema_obj
.get("properties", {})
.get("name", {})
.get("pattern", default_pattern)
)
if schema_patterns is not None:
schema_patterns[schema_name] = name_pattern