Commit cc48800d by Adam Palay

add logging for orders when 'purchase' is called on them multiple times ECOM-630

parent 2f78b967
......@@ -352,6 +352,9 @@ class Order(models.Model):
"""
if self.status == 'purchased':
log.error(
u"`purchase` method called on order {}, but order is already purchased.".format(self.id) # pylint: disable=E1101
)
return
self.status = 'purchased'
self.purchase_time = datetime.now(pytz.utc)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment