Skip to content

Commit 71b38f6

Browse files
authored
Merge pull request #18 from planet-a-ventures/joscha/remove-workaround
refactor: remove TODO comments and disable unknown fields removal in response handling
2 parents 6e43f77 + 3525cb1 commit 71b38f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

dlt_source_affinity/rest_client.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ def remove_unknown_fields(response: Response, *args: Any, **kwargs: Any) -> None
9191
Removes unknown fields from the response.
9292
This is a workaround for the fact that the API returns unknown fields that are not part of the schema.
9393
We remove these fields to avoid errors when validating the data.
94-
TODO: remove this when the API is fixed. ASAP. And because this makes me really sad; again: ASAP.
9594
"""
9695
if "application/json" in response.headers.get("Content-Type", ""):
9796
data = response.json()
@@ -126,9 +125,8 @@ def remove_unknown_fields(response: Response, *args: Any, **kwargs: Any) -> None
126125
"response": [
127126
# print_response,
128127
raise_if_error,
129-
# TODO: remove this when the API is fixed.
130128
# Workaround for https://github.com/planet-a-ventures/dlt-source-affinity/issues/11
131-
remove_unknown_fields,
129+
# remove_unknown_fields,
132130
]
133131
}
134132
MAX_PAGE_LIMIT_V1 = 500

0 commit comments

Comments
 (0)