fix
This commit is contained in:
parent
e45880bd8c
commit
2b58ce8930
@ -138,6 +138,9 @@ class InvoiceProduct(models.Model):
|
||||
if data['quantity'] <= 0:
|
||||
raise ValidationError("Počet předmětů ve faktuře musí být kladný!")
|
||||
|
||||
def __str__(self):
|
||||
return f"<InvoiceProduct {self.product.name} {self.invoice.invoice_id} *{self.quantity}"
|
||||
|
||||
|
||||
class Racer(InvoiceProduct):
|
||||
profile = models.ForeignKey(Profile, related_name='racers', on_delete=models.RESTRICT)
|
||||
|
@ -138,7 +138,6 @@ def register_racer(request):
|
||||
)
|
||||
invoice.save()
|
||||
racer.save()
|
||||
invoice.items.set([racer.id])
|
||||
|
||||
payment_data = {
|
||||
'merchant': COMGATE_MERCHANT,
|
||||
|
Loading…
x
Reference in New Issue
Block a user