Skip to content

Commit

Permalink
👌 [#63] Rename filter
Browse files Browse the repository at this point in the history
  • Loading branch information
SilviaAmAm authored and svenvandescheur committed Jun 13, 2024
1 parent 1d268e6 commit 5b48de3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions backend/src/openarchiefbeheer/zaken/api/filtersets.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ class ZaakFilter(FilterSet):
lookup_expr="icontains",
)

behandelend_afdeling = CharFilter(
field_name="behandelend_afdeling",
behandelend_afdeling__icontains = CharFilter(
field_name="behandelend_afdeling__icontains",
method="filter_behandelend_afdeling",
help_text="The 'behandelend afdeling' is the 'betrokkeneIdentificatie.identificatie' field of the roles related to the case which have betrokkeneType = organisatorische_eenheid.",
)
Expand Down
2 changes: 1 addition & 1 deletion backend/src/openarchiefbeheer/zaken/tests/test_viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def test_filter_behandelend_afdeling(self):
user = UserFactory(username="record_manager", role__can_start_destruction=True)

endpoint = furl(reverse("api:zaken-list"))
endpoint.args["behandelend_afdeling"] = "BLA"
endpoint.args["behandelend_afdeling__icontains"] = "BLA"

self.client.force_authenticate(user)
response = self.client.get(endpoint.url)
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/destructionlist/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ export function getFields(
name: "Behandelend afdeling",
active: false,
type: "string",
filterLookup: "behandelend_afdeling",
filterLookup: "behandelend_afdeling__icontains",
valueTransform: (rowData: object) => {
const rollen = (rowData as ExpandZaak)._expand?.rollen || [];
if (!rollen.length) return "";
Expand Down

0 comments on commit 5b48de3

Please sign in to comment.