From 9131cbefdc22103b62462f8e623aadb22a93e777 Mon Sep 17 00:00:00 2001 From: Jimmy-Lee Boisvert Date: Fri, 27 Nov 2020 15:52:28 -0500 Subject: [PATCH] Add support for new "warning" and "failedOrWarning" action types --- pyblish_lite/model.py | 8 ++++++++ pyblish_lite/version.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyblish_lite/model.py b/pyblish_lite/model.py index 2b536e5..a3c2401 100644 --- a/pyblish_lite/model.py +++ b/pyblish_lite/model.py @@ -226,6 +226,10 @@ def data(self, index, role): for action in actions: if action.on == "failed" and item._has_failed: return True + if action.on == "warning" and item._has_warning: + return True + if action.on == "failedOrWarning" and (item._has_failed or item._has_warning): + return True if action.on == "succeeded" and item._has_succeeded: return True if action.on == "processed" and item._has_processed: @@ -247,6 +251,10 @@ def data(self, index, role): for action in actions[:]: if action.on == "failed" and not item._has_failed: actions.remove(action) + if action.on == "warning" and not item._has_warning: + actions.remove(action) + if action.on == "failedOrWarning" and not (item._has_failed or item._has_warning): + actions.remove(action) if action.on == "succeeded" and not item._has_succeeded: actions.remove(action) if action.on == "processed" and not item._has_processed: diff --git a/pyblish_lite/version.py b/pyblish_lite/version.py index 5dc0db0..dc5af41 100644 --- a/pyblish_lite/version.py +++ b/pyblish_lite/version.py @@ -2,7 +2,7 @@ VERSION_MAJOR = 0 VERSION_MINOR = 8 VERSION_PATCH = 8 -VERSION_BETA = "b2" +VERSION_BETA = "b3" version_info = (VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_BETA) version = '%i.%i.%i%s' % version_info