always publish sub label if it's a known plate

This commit is contained in:
Josh Hawkins 2025-04-04 12:31:18 -05:00
parent 69a60baa12
commit 71148ded16

View File

@ -1395,13 +1395,8 @@ class LicensePlateProcessingMixin:
None, None,
) )
# don't overwrite sub label for objects that have a sub label # If it's a known plate, publish to sub_label
if sub_label is not None and obj_data.get("sub_label") is not None: if sub_label is not None:
logger.debug(
f"{camera}: Not overwriting sub label for recognized license plate due to existing sub label: {obj_data.get('sub_label')}."
)
elif sub_label is not None:
# If it's a known plate, publish to sub_label
self.sub_label_publisher.publish( self.sub_label_publisher.publish(
EventMetadataTypeEnum.sub_label, (id, sub_label, avg_confidence) EventMetadataTypeEnum.sub_label, (id, sub_label, avg_confidence)
) )