You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is a bug with ProcessManager.bind_state_fields method as it utilizes closures incorrectly:
forstate_field, process_classinkwargs.items():
ifnotissubclass(process_class, Process):
raiseTypeError('Must be a sub class of Process')
parameters[process_class.get_process_name()] =property(lambdaself: process_class(
field_name=state_field,
instance=self))
parameters['state_fields'].append(state_field)
With this code, value of the process_class variable inside the lambda function will always be the last class passed in kwargs to bind_state_fields method.
The text was updated successfully, but these errors were encountered:
khamenman
added a commit
to khamenman/django-logic
that referenced
this issue
Jan 12, 2020
Currently there is a bug with
ProcessManager.bind_state_fields
method as it utilizes closures incorrectly:With this code, value of the
process_class
variable inside the lambda function will always be the last class passed in kwargs tobind_state_fields
method.The text was updated successfully, but these errors were encountered: