diff --git a/bookwyrm/tests/views/test_shelf.py b/bookwyrm/tests/views/test_shelf.py index d873edc6..0d7d01cb 100644 --- a/bookwyrm/tests/views/test_shelf.py +++ b/bookwyrm/tests/views/test_shelf.py @@ -105,7 +105,7 @@ class ShelfViews(TestCase): shelf.refresh_from_db() self.assertEqual(shelf.name, "cool name") - self.assertEqual(shelf.identifier, "testshelf-%d" % shelf.id) + self.assertEqual(shelf.identifier, f"testshelf-{shelf.id}") def test_edit_shelf_name_not_editable(self, *_): """can't change the name of an non-editable shelf""" diff --git a/bookwyrm/views/shelf.py b/bookwyrm/views/shelf.py index 5d1008d0..6e75cc99 100644 --- a/bookwyrm/views/shelf.py +++ b/bookwyrm/views/shelf.py @@ -146,7 +146,7 @@ def shelve(request): # first we need to remove from the specified shelf change_from_current_identifier = request.POST.get("change-shelf-from") - if not change_from_current_identifier: + if change_from_current_identifier: # find the shelfbook obj and delete it get_object_or_404( models.ShelfBook,