Merged in fature/PYPE-685_better_anatomy (pull request #460)

Fature/PYPE-685 better anatomy

Approved-by: Milan Kolar <milan@orbi.tools>
This commit is contained in:
Jakub Trllo 2020-01-31 11:06:47 +00:00 committed by Milan Kolar
commit 64d4b60f17
3 changed files with 31 additions and 31 deletions

View file

@ -207,7 +207,12 @@ class UserAssigmentEvent(BaseEvent):
# formatting work dir is easiest part as we can use whole path
work_dir = anatomy.format(data)['avalon']['work']
# we also need publish but not whole
publish = anatomy.format_all(data)['partial']['avalon']['publish']
filled_all = anatomy.format_all(data)
if "partial" not in filled_all:
publish = filled_all['avalon']['publish']
else:
# Backwards compatibility
publish = filled_all["partial"]['avalon']['publish']
# now find path to {asset}
m = re.search("(^.+?{})".format(data['asset']),
publish)