Skip to content

Commit

Permalink
Merge pull request #116 from rodeofx/fix-missing-failed-actions-on-wa…
Browse files Browse the repository at this point in the history
…rnings

Fix missing "failed" actions on plugins with warnings instead of errors
  • Loading branch information
mottosso authored Dec 2, 2020
2 parents 5bea1c0 + 9131cbe commit 0349cd8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions pyblish_lite/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pyblish_lite/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0349cd8

Please sign in to comment.