-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Besoin): Ajout d'un template de mail transactionnel quand le bes…
…oin est suivi par un partenaire commercial (#1533)
- Loading branch information
1 parent
810669e
commit 4939bf0
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...he/tenders/migrations/0094_add_templatetransactional_tender_author_commercial_partners.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from django.db import migrations | ||
|
||
|
||
def create_template(apps, schema_editor): | ||
TemplateTransactional = apps.get_model("conversations", "TemplateTransactional") | ||
TemplateTransactional.objects.create( | ||
name="Dépôt de besoin : auteur : notification quand son besoin a été validé et pris en charge par les partenaires commerciaux", | ||
code="TENDERS_AUTHOR_CONFIRMATION_VALIDATED_COMMERCIAL_PARTNERS", | ||
description="Envoyé à l'auteur du besoin lorsque son besoin a été validé et qu'il n'est pas envoyé aux structures mais proposé aux partenaires commerciaux", | ||
) | ||
|
||
|
||
def delete_template(apps, schema_editor): | ||
TemplateTransactional = apps.get_model("conversations", "TemplateTransactional") | ||
TemplateTransactional.objects.get(code="TENDERS_AUTHOR_CONFIRMATION_VALIDATED_COMMERCIAL_PARTNERS").delete() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("tenders", "0093_alter_tender_send_to_commercial_partners_only"), | ||
] | ||
|
||
operations = [ | ||
migrations.RunPython(create_template, reverse_code=delete_template), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters