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