Fixing unit tests

This commit is contained in:
Cyber MacGeddon 2025-12-19 08:30:37 +00:00
parent 190d80d943
commit a3912ccfdf

View file

@ -57,7 +57,9 @@ class StructuredDataDiagnosisResponseTranslator(MessageTranslator):
result["descriptor"] = obj.descriptor
if obj.metadata:
result["metadata"] = obj.metadata
if obj.schema_matches: # Only include if non-empty list
# For schema-selection, always include schema_matches (even if empty)
# For other operations, only include if non-empty
if obj.operation == "schema-selection" or obj.schema_matches:
result["schema-matches"] = obj.schema_matches
return result