[gen] Bugfixes.
This commit is contained in:
parent
98b748cfb1
commit
8511bcd675
2 changed files with 5 additions and 2 deletions
|
@ -322,7 +322,7 @@ class Transition:
|
|||
# Condition is a role. Transition may be triggered if the user has
|
||||
# this role.
|
||||
return user.has_role(self.condition.name, obj)
|
||||
elif type(self.condition) == types.FunctionType:
|
||||
elif callable(self.condition):
|
||||
return self.condition(wf, obj.appy())
|
||||
elif type(self.condition) in (tuple, list):
|
||||
# It is a list of roles and/or functions. Transition may be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue