Merge pull request #3451 from Guanchishan/patch-1

Fix IntegrityError caused by duplicate periodic task creation
This commit is contained in:
Mouse Reeve 2024-10-17 15:23:31 -07:00 committed by GitHub
commit 7ecf3b65d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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",