Validation Error is now in context

This commit is contained in:
Jakub Trllo 2018-12-04 14:16:02 +01:00
parent 01b331fdd9
commit 9910fa0b0d
2 changed files with 3 additions and 2 deletions

View file

@ -151,7 +151,7 @@ class SyncToAvalon(BaseAction):
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
log_message = "{}/{}/Line: {}".format(exc_type, fname, exc_tb.tb_lineno)
self.log.error('Error during syncToAvalon: {}'.format(log_message))
message = 'Unexpected Error!!! (Please check Log for more information)'
message = 'Unexpected Error - Please check Log for more information'
if len(message) > 0:
message = "Unable to sync: {}".format(message)

View file

@ -8,7 +8,7 @@ from pype import lib
import avalon.io as io
import avalon.api
import avalon
from avalon.vendor import toml
from avalon.vendor import toml, jsonschema
from app.api import Logger
log = Logger.getLogger(__name__)
@ -74,6 +74,7 @@ def get_data(parent, entity, session, custom_attributes):
return data
def avalon_check_name(entity, inSchema = None):
ValidationError = jsonschema.ValidationError
alright = True
name = entity['name']
if " " in name: