Skip to content

Commit

Permalink
Merge pull request #262 from FJNR-inc/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
RignonNoel authored Nov 12, 2019
2 parents 3a99a7f + f0920fb commit a917bc0
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.279
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.38.0
colorama==0.4.1
19 changes: 19 additions & 0 deletions retirement/migrations/0022_auto_20191112_1128.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
1 change: 1 addition & 0 deletions retirement/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion retirement/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
73 changes: 73 additions & 0 deletions store/migrations/0032_auto_20191112_1128.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
10 changes: 8 additions & 2 deletions store/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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"),
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion store/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a917bc0

Please sign in to comment.