Set needs_update on hosts when updates are available
Fixes Issue 743
@@ -305,6 +305,10 @@ class UpdatesAvailableAlertResource(Resource):
)
)
+ if mh.needs_update is not available:
+ mh.needs_update = available
+ mh.save(update_fields=["needs_update"])
+
UpdatesAvailableAlert.notify(mh, available)
bundle.obj = {}
