Fix the email billing data when there is no results.

This commit is contained in:
Rebecca Law
2017-04-27 10:16:29 +01:00
committed by Ken Tsang
parent a186fc95be
commit fdbadf967e

View File

@@ -56,7 +56,9 @@ def email_billing_data_query(service_id, start_date, end_date):
NotificationHistory.international, NotificationHistory.international,
NotificationHistory.phone_prefix NotificationHistory.phone_prefix
).first() ).first()
if not result:
return 0, EMAIL_TYPE, None, False, None, 0
else:
return tuple(result) + (0,) return tuple(result) + (0,)