Change index of custom_labels to string

This commit is contained in:
Fuhrmann 2025-02-21 12:53:42 +01:00
parent 19ed988760
commit 2211eb92de

View file

@ -341,17 +341,19 @@ class FeatureRenderer:
fields, fields,
) as search_cursor: ) as search_cursor:
for row in search_cursor: for row in search_cursor:
if len(fields) == 3: id = str(row[0])
custom_labels[row[0]] = f"{row[1]}{label_delimieter}{row[2]}" if id not in custom_labels:
elif len(fields) == 2: if len(fields) == 3:
if label_field_1 == primary_key_field: custom_labels[id] = f"{row[1]}{label_delimieter}{row[2]}"
custom_labels[row[0]] = ( elif len(fields) == 2:
f"{row[0]}{label_delimieter}{row[1]}" if label_field_1 == primary_key_field:
) custom_labels[id] = (
else: f"{row[0]}{label_delimieter}{row[1]}"
custom_labels[row[0]] = f"{row[1]}" )
elif len(fields) == 1: else:
custom_labels[row[0]] = f"{row[0]}" custom_labels[id] = f"{row[1]}"
elif len(fields) == 1:
custom_labels[id] = f"{row[0]}"
# Retrieve headings # Retrieve headings
headings = {} headings = {}