Lowercased task type

This commit is contained in:
Petr Kalis 2021-09-17 13:28:49 +02:00
parent fd6bd1dbc1
commit 0a033f4dbe

View file

@ -177,9 +177,11 @@ class CollectPublishedFiles(pyblish.api.ContextPlugin):
(family, [families], subset_template_name, tags) tuple
AssertionError if not matching family found
"""
if task_type:
task_type = task_type.capitalize()
task_obj = settings.get(task_type)
task_type = task_type.lower()
lower_cased_task_types = {}
for t_type, task in settings.items():
lower_cased_task_types[t_type.lower()] = task
task_obj = lower_cased_task_types.get(task_type)
assert task_obj, "No family configuration for '{}'".format(task_type)
found_family = None