mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-24 17:04:25 +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")
|
||||
db_alias = schema_editor.connection.alias
|
||||
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',
|
||||
subject='(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'
|
||||
)
|
||||
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',
|
||||
subject='(Fusionné)',
|
||||
heading='Ticket Fusionné',
|
||||
|
Loading…
Reference in New Issue
Block a user