record document count when processing api notifications

if someone doesn't send any documents, set the value to None. If it's
not specified, it defaults to None anyway.
This commit is contained in:
Leo Hemsted
2020-02-12 16:07:07 +00:00
parent 743acf71e4
commit 1694395b17
4 changed files with 41 additions and 13 deletions

View File

@@ -70,7 +70,8 @@ def persist_notification(
reply_to_text=None,
billable_units=None,
postage=None,
template_postage=None
template_postage=None,
document_download_count=None,
):
notification_created_at = created_at or datetime.utcnow()
if not notification_id:
@@ -94,7 +95,8 @@ def persist_notification(
created_by_id=created_by_id,
status=status,
reply_to_text=reply_to_text,
billable_units=billable_units
billable_units=billable_units,
document_download_count=document_download_count,
)
if notification_type == SMS_TYPE: