mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-03 15:50:12 -04:00
client: cbc_proxy passes through sent/expires
A BroadcastEvent knows when an event was sent and should expire We pass through these values directly to the CBC Proxy, because BroadcastEvent knows how they should be formatted Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
This commit is contained in:
@@ -2353,6 +2353,10 @@ class BroadcastEvent(db.Model):
|
||||
def sent_at_as_cap_datetime_string(self):
|
||||
return self.formatted_datetime_for('sent_at')
|
||||
|
||||
@property
|
||||
def transmitted_finishes_at_as_cap_datetime_string(self):
|
||||
return self.formatted_datetime_for('transmitted_finishes_at')
|
||||
|
||||
def formatted_datetime_for(self, property_name):
|
||||
return self.convert_naive_utc_datetime_to_cap_standard_string(
|
||||
getattr(self, property_name)
|
||||
|
||||
Reference in New Issue
Block a user