Fix - files on representation cannot be single item list (#5545)

Further logic expects that single item files will be only 'string' not 'list' (eg. repre["files"] = "abc.exr" not repre["files"] = ["abc.exr"].

This would cause an issue in ExtractReview later.
This commit is contained in:
Petr Kalis 2023-09-04 11:05:27 +02:00 committed by GitHub
parent dc684b65f3
commit 0f39ccf016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,10 @@ class ValidateExpectedFiles(pyblish.api.InstancePlugin):
# Update the representation expected files
self.log.info("Update range from actual job range "
"to frame list: {}".format(frame_list))
repre["files"] = sorted(job_expected_files)
# single item files must be string not list
repre["files"] = (sorted(job_expected_files)
if len(job_expected_files) > 1 else
list(job_expected_files)[0])
# Update the expected files
expected_files = job_expected_files