What's the value of short-circuiting in dispatch? The point of dispatch is to call the trigger in a many-models-single-machine situation. I don't want the arbitrary ordering of the models to affect whether some models are allowed to trigger. I think this is a bug, but if not can someone explain to me the design choice?
def dispatch(self, trigger, *args, **kwargs):
"""Trigger an event on all models assigned to the machine.
Args:
trigger (str): Event name
*args (list): List of arguments passed to the event trigger
**kwargs (dict): Dictionary of keyword arguments passed to the event trigger
Returns:
bool The truth value of all triggers combined with AND
"""
return all(getattr(model, trigger)(*args, **kwargs) for model in self.models)
What's the value of short-circuiting in
dispatch? The point of dispatch is to call the trigger in a many-models-single-machine situation. I don't want the arbitrary ordering of the models to affect whether some models are allowed to trigger. I think this is a bug, but if not can someone explain to me the design choice?