Allow None value for billing_reason

This commit is contained in:
PCoder 2019-11-28 13:59:03 +05:30
parent bed57786d7
commit cc5d82ccac
1 changed files with 4 additions and 1 deletions

View File

@ -345,7 +345,10 @@ class MonthlyHostingBill(AssignPermissionsMixin, models.Model):
args['period_start']).replace(tzinfo=pytz.utc),
period_end=datetime.utcfromtimestamp(
args['period_end']).replace(tzinfo=pytz.utc),
billing_reason=args['billing_reason'],
billing_reason=(
args['billing_reason']
if args['billing_reason'] is not None else ''
),
discount=args['discount'],
total=args['total'],
lines_data_count=args['lines_data_count'],