mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge pull request #1772 from pypeclub/bugfix/sp_validate_frame_single_file
Fix - single file files are str only, cast it to list to count properly
This commit is contained in:
commit
46147cb78d
1 changed files with 4 additions and 1 deletions
|
|
@ -43,7 +43,10 @@ class ValidateFrameRange(pyblish.api.InstancePlugin):
|
|||
self.log.warning("Cannot check for extension {}".format(ext))
|
||||
return
|
||||
|
||||
frames = len(instance.data.get("representations", [None])[0]["files"])
|
||||
files = instance.data.get("representations", [None])[0]["files"]
|
||||
if isinstance(files, str):
|
||||
files = [files]
|
||||
frames = len(files)
|
||||
|
||||
err_msg = "Frame duration from DB:'{}' ". format(int(duration)) +\
|
||||
" doesn't match number of files:'{}'".format(frames) +\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue