Return a valid mandate when bank account is inactived
1- Create two bank accounts and mandates. After that, the first bank account mark to inactive.
2- When create payment group, is_valid mandate is firt bank account the inactived bank account; not the second.
Example to solve it:
@property
def is_valid(self):
is_valid = super().is_valid
if not self.account_number.account.active:
return False
return is_valid