remove list from group when changing curation

Allows 'group' to be blank when saving a list.
Removes the 'group' field when saving a list with curation other than 'group' - this stops the list "sticking" to a group after it is changed from group curation to something else.
This commit is contained in:
Hugh Rundle
2021-09-26 18:28:16 +10:00
parent 8bfc71db6e
commit 5fccb991a7
3 changed files with 7 additions and 11 deletions

View File

@ -37,7 +37,8 @@ class List(OrderedCollectionMixin, BookWyrmModel):
group = models.ForeignKey(
"Group",
on_delete=models.CASCADE,
null=True
default=None,
blank=True
)
books = models.ManyToManyField(
"Edition",