From a24cd08e0d69a9d4e75aee109ba0fdd47eb4c256 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Wed, 23 Oct 2019 20:13:02 -0400 Subject: [PATCH 1/9] Update awscli from 1.16.263 to 1.16.265 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index abe016e4..6f913940 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ pycodestyle==2.5.0 coveralls==1.8.2 responses==0.10.6 six==1.12.0 -awscli==1.16.263 +awscli==1.16.265 From 7dd3006f0730e3b19825dbb3f7b7a58dfea06666 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 29 Oct 2019 17:43:13 -0400 Subject: [PATCH 2/9] Update awscli from 1.16.265 to 1.16.269 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 6f913940..b4ec4067 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ pycodestyle==2.5.0 coveralls==1.8.2 responses==0.10.6 six==1.12.0 -awscli==1.16.265 +awscli==1.16.269 From f632b075129612e1e449a01c8f137667f025463c Mon Sep 17 00:00:00 2001 From: Jerome Celle Date: Wed, 30 Oct 2019 15:25:05 +0100 Subject: [PATCH 3/9] Fix retreat.pictures[0] to retreat.pictures.first() --- retirement/serializers.py | 2 +- store/serializers.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/retirement/serializers.py b/retirement/serializers.py index 93ae17e0..c4fb0322 100644 --- a/retirement/serializers.py +++ b/retirement/serializers.py @@ -863,7 +863,7 @@ def update(self, instance, validated_data): if len(new_retreat.pictures.all()): merge_data['RETREAT_PICTURE'] = "{0}{1}".format( settings.MEDIA_URL, - new_retreat.pictures[0].picture.url + new_retreat.pictures.first().picture.url ) plain_msg = render_to_string("exchange.txt", merge_data) diff --git a/store/serializers.py b/store/serializers.py index 481f57d4..97f5f3a3 100644 --- a/store/serializers.py +++ b/store/serializers.py @@ -912,7 +912,7 @@ def create(self, validated_data): if len(retreat_reservation.retreat.pictures.all()): merge_data['RETREAT_PICTURE'] = "{0}{1}".format( settings.MEDIA_URL, - retreat_reservation.retreat.pictures[0].picture.url + retreat_reservation.retreat.pictures.first().picture.url ) plain_msg = render_to_string( From 0b3664c2e400f39c5c85c602ac2464e67b45a68d Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Thu, 31 Oct 2019 14:11:15 -0400 Subject: [PATCH 4/9] Update tqdm from 4.36.1 to 4.37.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1b0752c8..ddfea445 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,5 +21,5 @@ django-safedelete==0.5.2 django-import-export==1.2.0 jsonfield==2.0.2 django-model-utils==3.2.0 -tqdm==4.36.1 +tqdm==4.37.0 colorama==0.4.1 From 1728ecc811d0231a5f8996798653b013539cc7a9 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 4 Nov 2019 06:51:27 -0500 Subject: [PATCH 5/9] Update django from 2.2.6 to 2.2.7 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1b0752c8..9a9650c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==2.2.6 +Django==2.2.7 djangorestframework==3.10.3 django-cors-headers==3.1.1 django-filter==2.2.0 From f8de6fdcb64771ab5ca2b463612b2521790d5b29 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Tue, 5 Nov 2019 23:35:01 +0100 Subject: [PATCH 6/9] Update awscli from 1.16.269 to 1.16.274 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index b4ec4067..63924026 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ pycodestyle==2.5.0 coveralls==1.8.2 responses==0.10.6 six==1.12.0 -awscli==1.16.269 +awscli==1.16.274 From 2a7d51ec3750e48ecc89187f991b28b3587bd295 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Sat, 9 Nov 2019 16:01:57 -0500 Subject: [PATCH 7/9] Update tqdm from 4.37.0 to 4.38.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7cfc7033..2acf8b4b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,5 +21,5 @@ django-safedelete==0.5.2 django-import-export==1.2.0 jsonfield==2.0.2 django-model-utils==3.2.0 -tqdm==4.37.0 +tqdm==4.38.0 colorama==0.4.1 From d81e49de73b595b9e744b597b91fe3779196756e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 11 Nov 2019 18:09:55 -0500 Subject: [PATCH 8/9] Update awscli from 1.16.274 to 1.16.279 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 63924026..22199fed 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,4 @@ pycodestyle==2.5.0 coveralls==1.8.2 responses==0.10.6 six==1.12.0 -awscli==1.16.274 +awscli==1.16.279 From 4ad528862209101be320c00515c8381a8bce433b Mon Sep 17 00:00:00 2001 From: Jerome Celle Date: Tue, 12 Nov 2019 17:33:30 +0100 Subject: [PATCH 9/9] Fix missing blank in case of null in model --- .../migrations/0022_auto_20191112_1128.py | 19 +++++ retirement/models.py | 1 + store/migrations/0032_auto_20191112_1128.py | 73 +++++++++++++++++++ store/models.py | 10 ++- 4 files changed, 101 insertions(+), 2 deletions(-) create mode 100644 retirement/migrations/0022_auto_20191112_1128.py create mode 100644 store/migrations/0032_auto_20191112_1128.py diff --git a/retirement/migrations/0022_auto_20191112_1128.py b/retirement/migrations/0022_auto_20191112_1128.py new file mode 100644 index 00000000..71a90f28 --- /dev/null +++ b/retirement/migrations/0022_auto_20191112_1128.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.6 on 2019-11-12 16:28 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('retirement', '0021_auto_20191010_1503'), + ] + + operations = [ + migrations.AlterField( + model_name='reservation', + name='order_line', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='retreat_reservations', to='store.OrderLine', verbose_name='Order line'), + ), + ] diff --git a/retirement/models.py b/retirement/models.py index c743ae55..3fe245f1 100644 --- a/retirement/models.py +++ b/retirement/models.py @@ -468,6 +468,7 @@ class Reservation(SafeDeleteModel): verbose_name=_("Order line"), related_name='retreat_reservations', null=True, + blank=True ) refundable = models.BooleanField( verbose_name=_("Refundable"), diff --git a/store/migrations/0032_auto_20191112_1128.py b/store/migrations/0032_auto_20191112_1128.py new file mode 100644 index 00000000..b84859e1 --- /dev/null +++ b/store/migrations/0032_auto_20191112_1128.py @@ -0,0 +1,73 @@ +# Generated by Django 2.2.6 on 2019-11-12 16:28 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('store', '0031_auto_20190901_1043'), + ] + + operations = [ + migrations.AlterField( + model_name='coupon', + name='percent_off', + field=models.PositiveIntegerField(blank=True, null=True, verbose_name='Percentage off'), + ), + migrations.AlterField( + model_name='coupon', + name='value', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Value'), + ), + migrations.AlterField( + model_name='historicalcoupon', + name='percent_off', + field=models.PositiveIntegerField(blank=True, null=True, verbose_name='Percentage off'), + ), + migrations.AlterField( + model_name='historicalcoupon', + name='value', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Value'), + ), + migrations.AlterField( + model_name='historicalmembership', + name='old_id', + field=models.IntegerField(blank=True, null=True, verbose_name='Id before migrate to base product'), + ), + migrations.AlterField( + model_name='historicalmembershipcoupon', + name='percent_off', + field=models.PositiveIntegerField(blank=True, null=True, verbose_name='Percentage off'), + ), + migrations.AlterField( + model_name='historicalmembershipcoupon', + name='value', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Value'), + ), + migrations.AlterField( + model_name='historicalpackage', + name='old_id', + field=models.IntegerField(blank=True, null=True, verbose_name='Id before migrate to base product'), + ), + migrations.AlterField( + model_name='membership', + name='old_id', + field=models.IntegerField(blank=True, null=True, verbose_name='Id before migrate to base product'), + ), + migrations.AlterField( + model_name='membershipcoupon', + name='percent_off', + field=models.PositiveIntegerField(blank=True, null=True, verbose_name='Percentage off'), + ), + migrations.AlterField( + model_name='membershipcoupon', + name='value', + field=models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True, verbose_name='Value'), + ), + migrations.AlterField( + model_name='package', + name='old_id', + field=models.IntegerField(blank=True, null=True, verbose_name='Id before migrate to base product'), + ), + ] diff --git a/store/models.py b/store/models.py index bef9891c..4d0c67fd 100644 --- a/store/models.py +++ b/store/models.py @@ -395,7 +395,9 @@ class Meta: old_id = models.IntegerField( verbose_name=_("Id before migrate to base product"), - null=True,) + null=True, + blank=True + ) duration = models.DurationField() @@ -419,7 +421,9 @@ class Meta: old_id = models.IntegerField( verbose_name=_("Id before migrate to base product"), - null=True,) + null=True, + blank=True, + ) reservations = models.PositiveIntegerField( verbose_name=_("Reservations"), @@ -551,12 +555,14 @@ class AbstractCoupon(SafeDeleteModel): decimal_places=2, verbose_name=_("Value"), null=True, + blank=True, ) # is zero if value is not percent_off = models.PositiveIntegerField( verbose_name=_("Percentage off"), null=True, + blank=True, ) max_use = models.PositiveIntegerField()