From ca8253894acb2810d62c5eb8d384e38bfde1732e Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Tue, 31 Dec 2019 12:45:38 +0000 Subject: [PATCH] FIX #321: Authorisation time shown as 'None' in emails (#378) * FIX #321: Authorisation Success emails dated 'None' * FIX: Additionally fix datestamp on HTML client emails (#321) --- RIGS/templates/RIGS/eventauthorisation_client_success.html | 2 +- RIGS/templates/RIGS/eventauthorisation_client_success.txt | 4 ++-- RIGS/templates/RIGS/eventauthorisation_mic_success.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RIGS/templates/RIGS/eventauthorisation_client_success.html b/RIGS/templates/RIGS/eventauthorisation_client_success.html index dc6d0485..398dee80 100644 --- a/RIGS/templates/RIGS/eventauthorisation_client_success.html +++ b/RIGS/templates/RIGS/eventauthorisation_client_success.html @@ -6,7 +6,7 @@

Your event N{{ object.event.pk|stringformat:"05d" }} has been successfully authorised for £{{ object.amount }} - by {{ object.name }} as of {{ object.last_edited_at }}. + by {{ object.name }} as of {{ object.event.last_edited_at }}.

diff --git a/RIGS/templates/RIGS/eventauthorisation_client_success.txt b/RIGS/templates/RIGS/eventauthorisation_client_success.txt index ff934c4d..c511fc72 100644 --- a/RIGS/templates/RIGS/eventauthorisation_client_success.txt +++ b/RIGS/templates/RIGS/eventauthorisation_client_success.txt @@ -1,6 +1,6 @@ -Hi {{ to_name|default:"there" }}, +Hi {{ to_name|default_if_none:"there" }}, -Your event N{{object.event.pk|stringformat:"05d"}} has been successfully authorised for £{{object.amount}} by {{object.name}} as of {{object.last_edited_at}}. +Your event N{{object.event.pk|stringformat:"05d"}} has been successfully authorised for £{{object.amount}} by {{object.name}} as of {{object.event.last_edited_at}}. {% if object.event.organisation and object.event.organisation.union_account %}{# internal #} Your event is now fully booked and payment will be processed by the finance department automatically. diff --git a/RIGS/templates/RIGS/eventauthorisation_mic_success.txt b/RIGS/templates/RIGS/eventauthorisation_mic_success.txt index 7548cad4..43ddd5e1 100644 --- a/RIGS/templates/RIGS/eventauthorisation_mic_success.txt +++ b/RIGS/templates/RIGS/eventauthorisation_mic_success.txt @@ -1,5 +1,5 @@ Hi {{object.event.mic.get_full_name|default_if_none:"somebody"}}, -Just to let you know your event N{{object.event.pk|stringformat:"05d"}} has been successfully authorised for £{{object.amount}} by {{object.name}} as of {{object.last_edited_at}}. +Just to let you know your event N{{object.event.pk|stringformat:"05d"}} has been successfully authorised for £{{object.amount}} by {{object.name}} as of {{object.event.last_edited_at}}. The TEC Rig Information Gathering System