allow the ExchangeRate to be null
If we buy the article in CHF there is no ExchangeRate object
This commit is contained in:
parent
b9d2d9f6ae
commit
9b0fc0ba06
|
@ -84,7 +84,7 @@ class Order(models.Model):
|
|||
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
||||
status = models.ForeignKey(OrderStatus)
|
||||
date = models.DateTimeField(default=timezone.now)
|
||||
exchange_rate = models.ForeignKey(ExchangeRate)
|
||||
exchange_rate = models.ForeignKey(ExchangeRate, null=True)
|
||||
|
||||
def __str__(self):
|
||||
return str(self.id)
|
||||
|
|
Loading…
Reference in New Issue