Commit 546d231c by Adam

Merge pull request #5904 from edx/adam/add-logging-multiple-purchases

add logging for orders when 'purchase' is called on them multiple times ...
parents 2f78b967 cc48800d
......@@ -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