X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a98d18bc92d7d28d54c0cc1c1a636c9d79e6a648..51099aa7aa297f5f38fe052c5caa49b22170e7ac:/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py diff --git a/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py b/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py index 0c696b280..c73450c3a 100644 --- a/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py +++ b/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py @@ -6,8 +6,9 @@ from django.db import migrations, models def last_amount_wide(apps, schema_editor): SingleAmount = apps.get_model('club', 'SingleAmount') a = SingleAmount.objects.last() - a.wide = True - a.save() + if a is not None: + a.wide = True + a.save() class Migration(migrations.Migration):