Skip to content

Add `unique_together` constraint on `djwebdapp.models.Blockchain`

djwebdapp.models.Account should have a unique_together constraint on ("blockchain", "address") since this constraint is necessary in the Tezos provider: https://yourlabs.io/pyratzlabs/djwebdapp/-/blob/master/src/djwebdapp_tezos/provider.py#L109

Indeed, this line will fail if there are multiple accounts with the same address/blockchain pair, we should thus constraint it at the model level.