Skip to content

Allow only one bank account per user account

Daniel Clemente Laboreo requested to merge clemente/1to1-bank-account into master

This changes BankAccount from ForeignKey to OneToOneField so that each user account can have only one bank account, not many. We still don't have use cases to allow multiple bank accounts per user.

To review this

  • run tests (though right now I get 8 failures for January/December, and 1 for a missing InvoiceTemplate object, both unrelated)
  • check the code
  • test in admin: add, delete
  • run generate_account_data
  • maybe check API (though now it's failing with 'InvoiceViewSet' should either include a serializer_class attribute)

Merge request reports