Fixes shelf view boolean logic

This commit is contained in:
Mouse Reeve 2021-09-27 17:58:21 -07:00
parent f13f3d460c
commit e0aa8a7fdf
2 changed files with 2 additions and 2 deletions

View file

@ -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"""

View file

@ -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,