Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
gitcarbs committed Sep 17, 2024
1 parent 898911a commit 450e3d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafkaesk/consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _pydantic_msg_handler(
) -> pydantic.BaseModel:
try:
data: typing.Dict[str, typing.Any] = orjson.loads(record.value)
return model.model_construct(**data["data"])
return model.parse_obj(data["data"])
except orjson.JSONDecodeError:
# log the execption so we can see what fields failed
logger.warning(f"Payload is not valid json: {record}", exc_info=True)
Expand Down

0 comments on commit 450e3d3

Please sign in to comment.