allow the ExchangeRate to be null

If we buy the article in CHF there is no ExchangeRate object
This commit is contained in:
Andreas Zweili 2018-02-26 22:31:37 +01:00
parent b9d2d9f6ae
commit 9b0fc0ba06
1 changed files with 1 additions and 1 deletions

View File

@ -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)