From 627afe37e1b99a05cbc5f76b08e40c05f966799a Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Thu, 27 Oct 2022 13:52:03 +0200 Subject: [PATCH 1/2] Remove references to Alert.migrator_lock attribute This commit patches issue related to #708. #708 forgot to remove attributes on models outside of the migration_tool django app that were referencing model attributes from migration_tool. The only attribute that referenced a field in migration_tool was migrator_lock on the Alert model. This commit removes any references to that attribute. --- CHANGELOG.md | 4 ++++ engine/apps/alerts/models/alert.py | 10 +--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a44b44d..c85f2e0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## v1.0.46 (2022-10-27) + +- Bug fixes + ## v1.0.44 (2022-10-26) - Bug fix for an issue that was affecting phone verification diff --git a/engine/apps/alerts/models/alert.py b/engine/apps/alerts/models/alert.py index 7e362c72..b3355b51 100644 --- a/engine/apps/alerts/models/alert.py +++ b/engine/apps/alerts/models/alert.py @@ -232,21 +232,13 @@ class Alert(models.Model): return distinction - @property - def skip_signal(self): - try: - _ = self.migrator_lock - return True - except Alert.migrator_lock.RelatedObjectDoesNotExist: - return False - def listen_for_alert_model_save(sender, instance, created, *args, **kwargs): AlertGroup = apps.get_model("alerts", "AlertGroup") """ Here we invoke AlertShootingStep by model saving action. """ - if created and instance.group.maintenance_uuid is None and not instance.skip_signal: + if created and instance.group.maintenance_uuid is None: # RFCT - why additinal save ? instance.save() From 726650fe4c8d3ae2e6dfab9cd3ef05f16255934c Mon Sep 17 00:00:00 2001 From: Joey Orlando Date: Thu, 27 Oct 2022 15:23:17 +0200 Subject: [PATCH 2/2] Update CHANGELOG.md (#728) --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c85f2e0a..8f6d0e02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ - Bug fixes +## v1.0.45 (2022-10-27) + +- Bug fix to revert commit which removed unused engine code + ## v1.0.44 (2022-10-26) - Bug fix for an issue that was affecting phone verification