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:
Toby Lorne
2020-10-28 11:26:38 +00:00
parent 2c29b45c9c
commit dd012d6831
5 changed files with 42 additions and 3 deletions

View File

@@ -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)