Skip to content

Commit 21b2b1a

Browse files
committed
fix: update label assignment logic in term info parsing for accurate record IDs
1 parent ee618b5 commit 21b2b1a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/vfbquery/vfb_queries.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,12 @@ def term_info_parse_object(results, short_form):
537537

538538
if template_numeric != channel_numeric:
539539
print(f"Warning: Template ID {template_id} does not match channel ID {channel_id}")
540+
label = vfbTerm.template_channel.channel.label
541+
record["id"] = channel_id
542+
else:
543+
label = vfbTerm.term.core.label
544+
record["id"] = template_id
540545

541-
record["id"] = template_id
542-
label = vfbTerm.template_channel.channel.label
543546
if vfbTerm.template_channel.channel.symbol != "" and len(vfbTerm.template_channel.channel.symbol) > 0:
544547
label = vfbTerm.template_channel.channel.symbol
545548
record["label"] = label

0 commit comments

Comments
 (0)