From 26291f81ef690711b2942eaa8cedbd282bb5058f Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 5 Sep 2024 21:43:14 -0700 Subject: [PATCH] prevent ABID drift entirely when its set to False on a model --- archivebox/abid_utils/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/archivebox/abid_utils/models.py b/archivebox/abid_utils/models.py index f60a87e5..00a0df39 100644 --- a/archivebox/abid_utils/models.py +++ b/archivebox/abid_utils/models.py @@ -152,6 +152,7 @@ class ABIDModel(models.Model): else: print(f'\n#### WARNING: ABID of existing record is outdated and has not been updated ({self.__class__.__name__}.abid_drift_allowed={self.abid_drift_allowed})') print(change_error) + raise change_error def save(self, *args: Any, abid_drift_allowed: bool | None=None, **kwargs: Any) -> None: """Overriden save method ensures new ABID is generated while a new object is first saving."""