Bug: Alert updates not send when changing alert collection of a fridge
Expected Behavior
After changing an alert collection of a fridge, I expect an alert update to be initiated when CryoRelay polls for new updates.
Current Behavior
The expected behaviour does not occur
Possible Solution
Update the get
method of AlertDefinitionView
to also consider changes to Fridge.alert_def
Steps to Reproduce
- Change a
Fridge.alert_def
from oneAlertCollection
to another - Observe that, when a CryoRelay polls for alert updates, no updates will be returned
Context (Environment) and Detailed Description
When a CryoRelay performs a poll to determine if any of its fridges need an alert update, CryoAdmin should return the list of current alert rules for each fridge, if this list has changed since the last time the CryoRelay polled. However, if the Fridge.alert_def
has been changed from one AlertCollection
to another, CryoAdmin does not detect this as a modification and hence won't return the updated list when the CryoRelay polls for it.
Possible Implementation
Keep track of datetime when Fridge.alert_def
was last modified in addition to when the entire model was last modified