Skip to content

Commit

Permalink
Fix SiteSettings.default_user_auth_group FK on_delete value
Browse files Browse the repository at this point in the history
The migration uses `RESTRICT` instead of `PROTECT`, which is both more
correct, but also those values need to be identical, otherwise Django
thinks that there's a migration missing and will refuse to apply any
new migrations.
  • Loading branch information
chdorner committed Feb 18, 2023
1 parent 702c794 commit dc5b797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bookwyrm/models/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class SiteSettings(SiteModel):
invite_request_question = models.BooleanField(default=False)
require_confirm_email = models.BooleanField(default=True)
default_user_auth_group = models.ForeignKey(
auth_models.Group, null=True, blank=True, on_delete=models.PROTECT
auth_models.Group, null=True, blank=True, on_delete=models.RESTRICT
)

invite_question_text = models.CharField(
Expand Down

0 comments on commit dc5b797

Please sign in to comment.