|
|
@@ -344,10 +344,7 @@ class AbstractBasket(models.Model):
|
|
344
|
344
|
"""
|
|
345
|
345
|
Test if tax values are known for this basket
|
|
346
|
346
|
"""
|
|
347
|
|
- for line in self.all_lines():
|
|
348
|
|
- if not line.is_tax_known:
|
|
349
|
|
- return False
|
|
350
|
|
- return True
|
|
|
347
|
+ return all([line.is_tax_known for line in self.all_lines()])
|
|
351
|
348
|
|
|
352
|
349
|
@property
|
|
353
|
350
|
def total_excl_tax(self):
|
|
|
@@ -485,7 +482,7 @@ class AbstractBasket(models.Model):
|
|
485
|
482
|
"""
|
|
486
|
483
|
Test whether the basket contains a voucher with a given code
|
|
487
|
484
|
"""
|
|
488
|
|
- if not self.id:
|
|
|
485
|
+ if self.id is None:
|
|
489
|
486
|
return False
|
|
490
|
487
|
try:
|
|
491
|
488
|
self.vouchers.get(code=code)
|