Skip to content

Commit

Permalink
Fix: no ruleKey if feature count >= 10
Browse files Browse the repository at this point in the history
  • Loading branch information
nboisteault committed Mar 15, 2024
1 parent 9f4b2cc commit 9382c75
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 9382c75

Please sign in to comment.