fix for isbn import
authorRadek Czajka <rczajka@rczajka.pl>
Tue, 26 Sep 2023 11:53:14 +0000 (13:53 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Tue, 26 Sep 2023 11:53:14 +0000 (13:53 +0200)
src/isbn/models.py

index 14e973d..43d01bf 100644 (file)
@@ -142,7 +142,7 @@ class Isbn(models.Model):
                     add_note = False
                     if isbn.book is None:
                         isbn.book = catalogue_book
                     add_note = False
                     if isbn.book is None:
                         isbn.book = catalogue_book
-                    elif isbn.book is not catalogue_book:
+                    elif isbn.book != catalogue_book:
                         add_note = True
                     if not isbn.form:
                         isbn.form = form
                         add_note = True
                     if not isbn.form:
                         isbn.form = form