From cc5d82ccac37be4752ed8b6cb0fbf113eba6dbaf Mon Sep 17 00:00:00 2001 From: PCoder Date: Thu, 28 Nov 2019 13:59:03 +0530 Subject: [PATCH] Allow None value for billing_reason --- hosting/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosting/models.py b/hosting/models.py index 6050339a..0e6caa50 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -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'],