Skip to content

Commit

Permalink
fix: pop root key in s3.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nichmor authored Aug 23, 2024
1 parent 83ac75a commit e96bbc0
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/parselmouth/internals/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@ def get_channel_index(self, channel: SupportedChannels) -> Optional[IndexMapping
except self._s3_client.exceptions.NoSuchKey:
return None

loaded_json = json.loads(response["Body"].read().decode("utf-8"))
loaded_json.pop("root")

return IndexMapping.model_validate(loaded_json)
return IndexMapping.model_validate_json(response["Body"].read().decode("utf-8"))

def upload_mapping(self, entry: MappingEntry, file_name: str):
output = entry.model_dump_json()
Expand Down

0 comments on commit e96bbc0

Please sign in to comment.