Skip to content

Commit

Permalink
Merge pull request #263 from OnroerendErfgoed/develop
Browse files Browse the repository at this point in the history
Fix status param
  • Loading branch information
claeyswo authored Nov 27, 2024
2 parents 4808fab + 26270ca commit 5503462
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.5.1 (25-11-2024)
------------------

- Parameter status aanpassen

1.5.0 (25-11-2024)
------------------

Expand Down
10 changes: 5 additions & 5 deletions crabpy/gateway/adressenregister.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def gemeente_by_status(self, status):
if status else self.gemeenten
)

def list_gemeenten_by_provincie(self, provincie, gemeente_status=None):
def list_gemeenten_by_provincie(self, provincie, status=None):
"""
List all `gemeenten` in a `provincie`.
Expand All @@ -270,11 +270,11 @@ def list_gemeenten_by_provincie(self, provincie, gemeente_status=None):
provincie_niscode = provincie.niscode
return [
gemeente
for gemeente in self.gemeente_by_status(gemeente_status)
for gemeente in self.gemeente_by_status(status)
if gemeente.provincie_niscode == provincie_niscode
]

def list_gemeenten(self, gewest_niscode="2000", gemeente_status=None):
def list_gemeenten(self, gewest_niscode="2000", status=None):
"""
List all `gemeenten` in a `gewest`.
Expand All @@ -286,7 +286,7 @@ def list_gemeenten(self, gewest_niscode="2000", gemeente_status=None):
if gewest_niscode == "4000":
return [
gemeente
for gemeente in self.gemeente_by_status(gemeente_status)
for gemeente in self.gemeente_by_status(status)
if gemeente.niscode.startswith("21")
]
provincie_niscodes = [
Expand All @@ -296,7 +296,7 @@ def list_gemeenten(self, gewest_niscode="2000", gemeente_status=None):
]
return [
gemeente
for gemeente in self.gemeente_by_status(gemeente_status)
for gemeente in self.gemeente_by_status(status)
if gemeente.provincie_niscode in provincie_niscodes
]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
version = "1.5.0"
version = "1.5.1"
name = "crabpy"
readme = "README.md"
authors = [
Expand Down

0 comments on commit 5503462

Please sign in to comment.