Fix valid property output to always be an boolean

parent 1a94584c
......@@ -219,9 +219,10 @@ class BankAccount(models.Model):
def valid(self):
if self.valid_from and self.valid_until:
if self.valid_from is not None and self.valid_until is not None:
return self.valid_from <= < self.valid_until
return self.valid_from and self.valid_from <=
return (self.valid_from is not None
and self.valid_from <=
def __str__(self):
return f'{self.iban} - {}'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment