mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-01-07 06:28:52 +01:00
Fix 0034_create_email_template_for_merged.py
This commit is contained in:
parent
5df7b8ff85
commit
f1d530db2a
@ -7,7 +7,7 @@ def forwards_func(apps, schema_editor):
|
|||||||
EmailTemplate = apps.get_model("helpdesk", "EmailTemplate")
|
EmailTemplate = apps.get_model("helpdesk", "EmailTemplate")
|
||||||
db_alias = schema_editor.connection.alias
|
db_alias = schema_editor.connection.alias
|
||||||
EmailTemplate.objects.using(db_alias).create(
|
EmailTemplate.objects.using(db_alias).create(
|
||||||
id=EmailTemplate.objects.order_by('-id').first().id + 1, # because PG sequences are not reset
|
id=EmailTemplate.objects.using(db_alias).order_by('-id').first().id + 1 if EmailTemplate.objects.using(db_alias).first() else 1, # because PG sequences are not reset
|
||||||
template_name='merged',
|
template_name='merged',
|
||||||
subject='(Merged)',
|
subject='(Merged)',
|
||||||
heading='Ticket merged',
|
heading='Ticket merged',
|
||||||
@ -24,7 +24,7 @@ From now on, please answer on this ticket, or you can include the tag {{ ticket.
|
|||||||
locale='en'
|
locale='en'
|
||||||
)
|
)
|
||||||
EmailTemplate.objects.using(db_alias).create(
|
EmailTemplate.objects.using(db_alias).create(
|
||||||
id=EmailTemplate.objects.order_by('-id').first().id + 1, # because PG sequences are not reset
|
id=EmailTemplate.objects.using(db_alias).order_by('-id').first().id + 1, # because PG sequences are not reset
|
||||||
template_name='merged',
|
template_name='merged',
|
||||||
subject='(Fusionné)',
|
subject='(Fusionné)',
|
||||||
heading='Ticket Fusionné',
|
heading='Ticket Fusionné',
|
||||||
|
Loading…
Reference in New Issue
Block a user