mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-11 07:12:57 +02:00
fix(insights:category-explorer): category field not loading available categories correctly
This commit is contained in:
@@ -117,13 +117,15 @@ class CategoryForm(forms.Form):
|
|||||||
required=False,
|
required=False,
|
||||||
label=_("Category"),
|
label=_("Category"),
|
||||||
empty_label=_("Uncategorized"),
|
empty_label=_("Uncategorized"),
|
||||||
queryset=TransactionCategory.objects.filter(active=True),
|
queryset=TransactionCategory.objects.all(),
|
||||||
widget=TomSelect(clear_button=True),
|
widget=TomSelect(clear_button=True),
|
||||||
)
|
)
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
self.fields["category"].queryset = TransactionCategory.objects.all()
|
||||||
|
|
||||||
self.helper = FormHelper()
|
self.helper = FormHelper()
|
||||||
self.helper.form_tag = False
|
self.helper.form_tag = False
|
||||||
self.helper.disable_csrf = True
|
self.helper.disable_csrf = True
|
||||||
|
|||||||
Reference in New Issue
Block a user