X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/a98d18bc92d7d28d54c0cc1c1a636c9d79e6a648..1c9e2865ce8c6ab51b2fa3e43d3661089e7b7eb8:/src/club/migrations/0043_monthlyamount_wide_singleamount_wide.py?ds=sidebyside 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):