Commit 6b602c96 authored by Patrick's avatar Patrick

Clear email.alternatives before

parent caf24a58
...@@ -561,11 +561,17 @@ class Permanence(TranslatableModel): ...@@ -561,11 +561,17 @@ class Permanence(TranslatableModel):
for delivery_board in DeliveryBoard.objects.filter( for delivery_board in DeliveryBoard.objects.filter(
permanence=self permanence=self
): ):
new_delivery_board = DeliveryBoard.objects.create( if delivery_board.delivery_date is not None:
permanence=new_permanence, new_delivery_board = DeliveryBoard.objects.create(
delivery_point=delivery_board.delivery_point, permanence=new_permanence,
delivery_date=delivery_board.delivery_date + datetime.timedelta(days=every_x_days * i) delivery_point=delivery_board.delivery_point,
) delivery_date=delivery_board.delivery_date + datetime.timedelta(days=every_x_days * i)
)
else:
new_delivery_board = DeliveryBoard.objects.create(
permanence=new_permanence,
delivery_point=delivery_board.delivery_point,
)
for language in settings.PARLER_LANGUAGES[settings.SITE_ID]: for language in settings.PARLER_LANGUAGES[settings.SITE_ID]:
language_code = language["code"] language_code = language["code"]
translation.activate(language_code) translation.activate(language_code)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment