X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5c4d4fc7d89af4c95b3a8a9e501f18b628b952b6..d118760df169a0090cba294b6d98cfbf48ebbc19:/apps/catalogue/migrations/0003_fix_book_count_on_shelves.py diff --git a/apps/catalogue/migrations/0003_fix_book_count_on_shelves.py b/apps/catalogue/migrations/0003_fix_book_count_on_shelves.py index a161e277b..8180311b2 100644 --- a/apps/catalogue/migrations/0003_fix_book_count_on_shelves.py +++ b/apps/catalogue/migrations/0003_fix_book_count_on_shelves.py @@ -23,11 +23,11 @@ class Migration(DataMigration): 'tagged_item': qn(orm.TagRelation._meta.db_table), 'tag_id': tag.pk, } - + cursor = connection.cursor() cursor.execute(query) book_count = (cursor.fetchone() or (0,))[0] - + tag.book_count = book_count tag.save()