Add BankAccount #176
No reviewers
Labels
No labels
Security
TeX
auto-update
check
delete-eslint-rc-js
check
update-builddeps-package-json
check
update-eslint-rc-js
check
update-gitignore
check
update-merge-request-template
check
update-prettier-ignore
check
update-pyproject-toml
check
update-renovate-json
check
update-tox-ini
part
backend
part
ci
part
docs
part
frontend
part
i18n
part
non-technical
part
packaging
prio
1
prio
2
prio
3
release-mr-5.x
size
large
size
medium
size
small
source
customer
source
customer::fsmw
source
customer::fss
source
customer::teckids
source
downstream
type
bug
type
feature
type
refactoring
workflow
blocked
workflow
confirmed
workflow
current-todo
workflow
discussing
workflow
new-app
workflow
wontfix
source::aleksolotl
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
aleksis/AlekSIS-App-Tezor!176
Loading…
Reference in a new issue
No description provided.
Delete branch "37-store-person-related-long-term-payment-information"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Information and screenshots
Enhances #37
Checklist
tox -e reformat,lintusedapps.pyandREADME.rstup-to-dateBackend checklist
Frontend checklist (mandatory with ~"part::frontend")
40b83d5644e13dea9b8937-store-person-related-long-term-payment-informationto Add BankAccount@ -130,0 +132,4 @@"menu_title": "Bank Accounts","title_plural": "Bank Accounts","person": "Person","account_holder": "Account holder",`Account Holder
@ -130,0 +135,4 @@"account_holder": "Account holder","iban": "IBAN","bic": "BIC","account_types": "Account types"Account Types@ -0,0 +19,4 @@@classmethoddef get_default(cls) -> "BankAccountType":"""Get default address type."""Not
address type;-)@ -0,0 +40,4 @@on_delete=models.CASCADE,)account_holder = models.CharField(verbose_name=_("Account holder"), max_length=64)Is
64a technical limit of banks?I don't know, and a short research was not enlightening. I used
django-payments-sepaas inspiration, this is where the64comes from.@ -40,0 +45,4 @@"""Predicate for checking if a BankAccount belongs to the user's person."""if obj is None:return Falsereturn obj.person.user_id == user.idobj.person == user.person@ -219,0 +269,4 @@)rules.add_perm("tezor.view_bankaccounttype_rule", view_bank_account_type_predicate)change_bank_account_type_predicate = has_person & (edit@ -91,1 +111,4 @@@staticmethoddef resolve_bank_accounts(root, info, **kwargs) -> QuerySet:if info.context.user.is_anonymous:Maybe with
has_personinstead?@ -92,0 +113,4 @@def resolve_bank_accounts(root, info, **kwargs) -> QuerySet:if info.context.user.is_anonymous:return []qs = BankAccount.objects.filter(This could lead to duplicate entries (because of the OR). Would prefer `get_objects_for_user(...).union(BankAccount.objects.filter(person=info.context.user.person)
BankAccount.objects.filter(pk__in=...)1c237008c2b043b4fbe8b043b4fbe84eb20f2c36View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.