diff --git a/backend/apps/parks/models/parks.py b/backend/apps/parks/models/parks.py index 26a958f5..c24f3e29 100644 --- a/backend/apps/parks/models/parks.py +++ b/backend/apps/parks/models/parks.py @@ -382,6 +382,7 @@ class Park(StateMachineMixin, TrackedModel): # Try pghistory events print("Searching pghistory events") event_model = getattr(cls, "event_model", None) + historical_event = None if event_model: historical_event = event_model.objects.filter(slug=slug).order_by("-pgh_created_at").first()