Skip to content

Commit

Permalink
Fix typing for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves committed Feb 15, 2025
1 parent 697f8bc commit bc7b4ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/onyx/connectors/airtable/airtable_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def get_attachment_with_retry(url: str, record_id: str) -> bytes | None:
return [(" ".join(combined) if combined else str(field_info), default_link)]

if isinstance(field_info, list):
return [(item, default_link) for item in field_info]
return [(str(item), default_link) for item in field_info]

return [(str(field_info), default_link)]

Expand All @@ -268,7 +268,7 @@ def _process_field(
table_id: str,
view_id: str | None,
record_id: str,
) -> tuple[list[Section], dict[str, Any]]:
) -> tuple[list[Section], dict[str, str | list[str]]]:
"""
Process a single Airtable field and return sections or metadata.
Expand Down Expand Up @@ -342,7 +342,7 @@ def _process_record(
record_id = record["id"]
fields = record["fields"]
sections: list[Section] = []
metadata: dict[str, Any] = {}
metadata: dict[str, str | list[str]] = {}

# Get primary field value if it exists
primary_field_value = (
Expand Down

0 comments on commit bc7b4ec

Please sign in to comment.