mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-21 17:11:06 +00:00
Merge pull request #3451 from Guanchishan/patch-1
Fix IntegrityError caused by duplicate periodic task creation
This commit is contained in:
commit
7ecf3b65d7
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ class Dashboard(View):
|
|||
schedule, _ = IntervalSchedule.objects.get_or_create(
|
||||
**schedule_form.cleaned_data
|
||||
)
|
||||
PeriodicTask.objects.get_or_create(
|
||||
PeriodicTask.objects.update_or_create(
|
||||
interval=schedule,
|
||||
name="check-for-updates",
|
||||
task="bookwyrm.models.site.check_for_updates_task",
|
||||
|
|
Loading…
Reference in a new issue