Change index of custom_labels to string
This commit is contained in:
parent
19ed988760
commit
2211eb92de
1 changed files with 13 additions and 11 deletions
|
@ -341,17 +341,19 @@ class FeatureRenderer:
|
|||
fields,
|
||||
) as search_cursor:
|
||||
for row in search_cursor:
|
||||
id = str(row[0])
|
||||
if id not in custom_labels:
|
||||
if len(fields) == 3:
|
||||
custom_labels[row[0]] = f"{row[1]}{label_delimieter}{row[2]}"
|
||||
custom_labels[id] = f"{row[1]}{label_delimieter}{row[2]}"
|
||||
elif len(fields) == 2:
|
||||
if label_field_1 == primary_key_field:
|
||||
custom_labels[row[0]] = (
|
||||
custom_labels[id] = (
|
||||
f"{row[0]}{label_delimieter}{row[1]}"
|
||||
)
|
||||
else:
|
||||
custom_labels[row[0]] = f"{row[1]}"
|
||||
custom_labels[id] = f"{row[1]}"
|
||||
elif len(fields) == 1:
|
||||
custom_labels[row[0]] = f"{row[0]}"
|
||||
custom_labels[id] = f"{row[0]}"
|
||||
|
||||
# Retrieve headings
|
||||
headings = {}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue