Skip to content

Commit

Permalink
fix: update PeriodicTask from entry (celery#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
petr.prikryl committed Oct 17, 2022
1 parent 6b67b24 commit 87e845a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django_celery_beat/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,13 @@ def from_entry(cls, name, app=None, **entry):
def _unpack_fields(cls, schedule,
args=None, kwargs=None, relative=None, options=None,
**entry):
entry_schedules = {
model_field: None for _, _, model_field in cls.model_schedules
}
model_schedule, model_field = cls.to_model_schedule(schedule)
entry_schedules[model_field] = model_schedule
entry.update(
{model_field: model_schedule},
entry_schedules,
args=dumps(args or []),
kwargs=dumps(kwargs or {}),
**cls._unpack_options(**options or {})
Expand Down

0 comments on commit 87e845a

Please sign in to comment.