1
0
Fork 0

Keep group as a foreign key field

This commit is contained in:
Mouse Reeve 2022-07-04 20:32:13 -07:00
parent 9948dd2356
commit 801ba03aaf
2 changed files with 2 additions and 28 deletions

View file

@ -43,8 +43,8 @@ class Notification(BookWyrmModel):
related_users = models.ManyToManyField(
"User", symmetrical=False, related_name="notifications"
)
related_groups = models.ManyToManyField(
"Group", symmetrical=False, related_name="notifications"
related_group = models.ForeignKey(
"Group", on_delete=models.CASCADE, null=True, related_name="notifications"
)
related_status = models.ForeignKey("Status", on_delete=models.CASCADE, null=True)
related_import = models.ForeignKey("ImportJob", on_delete=models.CASCADE, null=True)