[gen] Bugfixes.

This commit is contained in:
Gaetan Delannay 2014-06-24 21:05:01 +02:00
parent 98b748cfb1
commit 8511bcd675
2 changed files with 5 additions and 2 deletions

View file

@ -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