mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-02-05 04:05:25 -05:00
fix: Initialize historical_event variable to None.
This commit is contained in:
@@ -382,6 +382,7 @@ class Park(StateMachineMixin, TrackedModel):
|
|||||||
# Try pghistory events
|
# Try pghistory events
|
||||||
print("Searching pghistory events")
|
print("Searching pghistory events")
|
||||||
event_model = getattr(cls, "event_model", None)
|
event_model = getattr(cls, "event_model", None)
|
||||||
|
historical_event = None
|
||||||
if event_model:
|
if event_model:
|
||||||
historical_event = event_model.objects.filter(slug=slug).order_by("-pgh_created_at").first()
|
historical_event = event_model.objects.filter(slug=slug).order_by("-pgh_created_at").first()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user