Skip to content

Commit

Permalink
Merge pull request #66 from nboisteault/fix-no-rulekey-feature-count-…
Browse files Browse the repository at this point in the history
…several-digits

Fix: no `ruleKey` if feature count >= 10
  • Loading branch information
Gustry authored Mar 15, 2024
2 parents 180108e + 9382c75 commit 61e4d39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lizmap_server/get_legend_graphic.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ def responseComplete(self):
symbol = symbols[idx]
symbol_label = symbol['title']
if show_feature_count:
match_label = re.match(r"(.*) \[≈?(?:\d|N/A)\]", symbol_label)
match_label = re.match(r"(.*) \[≈?(?:\d+|N/A)\]", symbol_label)
if match_label:
symbol_label = match_label.group(1)
else:
logger.info("GetLegendGraphic JSON: symbol label does not match '(.*) \\[≈?(?:\\d|N/A)\\]' '{}'".format(symbol['title']))
logger.info("GetLegendGraphic JSON: symbol label does not match '(.*) \\[≈?(?:\\d+|N/A)\\]' '{}'".format(symbol['title']))
try:
category = categories[symbol_label]
symbol['ruleKey'] = category['ruleKey']
Expand Down

0 comments on commit 61e4d39

Please sign in to comment.