Bad workflow-steps check: has_required_fields

Many of the tabs on the Instance Creation screen don't show a "*"
despite having require fields.  This is due to faulty logic in determining
whether the workflow-step has require fields.  (Previously, only keys from
the contributes list were checked.)

Change-Id: Id609da27c51f8d4725683d7fd1534ead0c3bb984
Closes-Bug: 1252005
This commit is contained in:
Matthew Wood 2013-12-11 11:30:28 -07:00
parent 53285cd967
commit 788ec08c4f
1 changed files with 1 additions and 5 deletions

View File

@ -438,11 +438,7 @@ class Step(object):
def has_required_fields(self):
"""Returns True if action contains any required fields."""
for key in self.contributes:
field = self.action.fields.get(key, None)
if (field and field.required):
return True
return False
return any(field.required for field in self.action.fields.values())
class WorkflowMetaclass(type):