Added logging for all basic operations

This commit is contained in:
Raphael Michel
2015-12-12 22:35:25 +01:00
parent 83b5fa2fa6
commit 58b85819bc
18 changed files with 316 additions and 61 deletions

View File

@@ -2,7 +2,7 @@ import random
import string
from datetime import datetime
from django.db import models
from django.db import models, transaction
from django.utils.timezone import now
from django.utils.translation import ugettext_lazy as _
from typing import List, Union
@@ -177,14 +177,6 @@ class Order(LoggedModel):
return True
return False # nothing there to modify
def mark_refunded(self):
"""
Mark this order as refunded. This sets the payment status and returns the order object.
"""
self.status = Order.STATUS_REFUNDED
self.save()
return self
def _can_be_paid(self) -> Union[bool, str]:
error_messages = {
'late': _("The payment is too late to be accepted."),