Skip to content

Commit

Permalink
beautify code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wim-De-Clercq committed Aug 12, 2021
1 parent 55ea339 commit 0f56e30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crabpy_pyramid/renderers/crab.py
Expand Up @@ -72,9 +72,9 @@ def list_straten_adapter(obj, request):
:class:`crabpy.gateway.crab.Straat` to json.
"""
naam = obj.label
for _tuple in obj.namen:
if _tuple[1] == 'nl' and _tuple[0]:
naam = _tuple[0]
for (language, name) in obj.namen:
if language == 'nl' and name:
naam = name
break
return {
'id': obj.id,
Expand Down

0 comments on commit 0f56e30

Please sign in to comment.