Commit 9c44eb4e authored by Thijs de Jong's avatar Thijs de Jong

Merge branch 'valid-property-none' into 'master'

Fix valid property output to always be an boolean

See merge request !1398
parents da49820e 8c1414da
......@@ -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
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment