diff --git a/bookwyrm/tests/views/test_book.py b/bookwyrm/tests/views/test_book.py index bba83714e..1549bdc64 100644 --- a/bookwyrm/tests/views/test_book.py +++ b/bookwyrm/tests/views/test_book.py @@ -149,8 +149,8 @@ class BookViews(TestCase): form.data["last_edited_by"] = self.local_user.id request = self.factory.post("", form.data) request.user = self.local_user - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - view(request) + + view(request) book = models.Edition.objects.get(title="New Title") self.assertEqual(book.parent_work.title, "New Title") @@ -164,8 +164,8 @@ class BookViews(TestCase): form.data["last_edited_by"] = self.local_user.id request = self.factory.post("", form.data) request.user = self.local_user - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - view(request) + + view(request) book = models.Edition.objects.get(title="New Title") self.assertEqual(book.parent_work, self.work) @@ -179,8 +179,8 @@ class BookViews(TestCase): form.data["last_edited_by"] = self.local_user.id request = self.factory.post("", form.data) request.user = self.local_user - with patch("bookwyrm.models.activitypub_mixin.broadcast_task.delay"): - view(request) + + view(request) book = models.Edition.objects.get(title="New Title") self.assertEqual(book.parent_work.title, "New Title") self.assertEqual(book.authors.first().name, "Sappho") diff --git a/bookwyrm/views/books.py b/bookwyrm/views/books.py index ecba43766..ae60c677d 100644 --- a/bookwyrm/views/books.py +++ b/bookwyrm/views/books.py @@ -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)