Fix bugs
- fetch_stripe_bills:
- fix wrong assigment of strign to num_invoice_created variable
- return None (do not handle the case) if we don't have an order
This commit is contained in:
parent
72741f2188
commit
c29193f6c8
2 changed files with 10 additions and 2 deletions
|
|
@ -319,7 +319,10 @@ class MonthlyHostingBill(AssignPermissionsMixin, models.Model):
|
|||
logger.debug("Neither subscription id nor vm_id available")
|
||||
logger.debug("Can't import invoice")
|
||||
return None
|
||||
|
||||
if args['order'] is None:
|
||||
logger.error(
|
||||
"Order is None for {}".format(args['invoice_id']))
|
||||
return None
|
||||
instance = cls.objects.create(
|
||||
created=datetime.utcfromtimestamp(
|
||||
args['created']).replace(tzinfo=pytz.utc),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue