Skip to content

Commit

Permalink
Merge pull request #3451 from Guanchishan/patch-1
Browse files Browse the repository at this point in the history
Fix IntegrityError caused by duplicate periodic task creation
  • Loading branch information
mouse-reeve authored Oct 17, 2024
2 parents f1b0e4b + 6143aa6 commit 7ecf3b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bookwyrm/views/admin/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def post(self, request):
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",
Expand Down

0 comments on commit 7ecf3b6

Please sign in to comment.