Skip to content

Commit

Permalink
fix (schedulers): when model.date_changed is None, use _default.now()
Browse files Browse the repository at this point in the history
  • Loading branch information
chentiantian committed Jun 14, 2024
1 parent 3bfd56b commit 8a94a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_celery_beat/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, model, app=None):
self.model = model

if not model.last_run_at:
model.last_run_at = model.date_changed
model.last_run_at = model.date_changed or self._default_now()
# if last_run_at is not set and
# model.start_time last_run_at should be in way past.
# This will trigger the job to run at start_time
Expand Down

0 comments on commit 8a94a48

Please sign in to comment.