mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-12-02 21:24:17 +01:00
feat(dca): limit create-transaction accounts to the strategy currencies
This commit is contained in:
1 parent
750b86394e
commit
3468b10e94
2 files changed
+16
No files matched your search
@@ -250,6 +250,7 @@ class DCAEntryForm(forms.ModelForm):
|
||||
|
||||
self.fields["from_account"].queryset = Account.objects.filter(
|
||||
is_archived=False,
|
||||
currency=self.strategy.payment_currency,
|
||||
)
|
||||
|
||||
self.fields["from_category"].queryset = TransactionCategory.objects.filter(
|
||||
@@ -259,6 +260,7 @@ class DCAEntryForm(forms.ModelForm):
|
||||
|
||||
self.fields["to_account"].queryset = Account.objects.filter(
|
||||
is_archived=False,
|
||||
currency=self.strategy.target_currency,
|
||||
)
|
||||
|
||||
self.fields["to_category"].queryset = TransactionCategory.objects.filter(
|
||||
|
||||
Reference in new issue
Block a user