Fix error with saving readnly inlines in admin.
[wolnelektury.git] / src / catalogue / management / commands / load_abstracts.py
1 # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
3 #
4 from django.core.management.base import BaseCommand
5
6 from catalogue.models import Book
7
8
9 class Command(BaseCommand):
10     def handle(self, *args, **options):
11         for b in Book.objects.order_by('slug'):
12             print(b.slug)
13             b.load_abstract()
14             b.save()