Make sure creating books doesn't broadcast in tests

This commit is contained in:
Mouse Reeve
2021-03-08 11:54:26 -08:00
parent 37e29cc735
commit 500394fc52
2 changed files with 8 additions and 7 deletions

View File

@ -209,7 +209,8 @@ class ConfirmEditBook(View):
work = models.Work.objects.create(title=form.cleaned_data["title"])
work.authors.set(book.authors.all())
book.parent_work = work
book.save()
# we don't tell the world when creating a book
book.save(broadcast=False)
for author_id in request.POST.getlist("remove_authors"):
book.authors.remove(author_id)