Skip to content

Commit

Permalink
Merged branch bugfix/work-on-it into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
horia141 committed Mar 4, 2024
1 parent 2342b61 commit 8f59e6f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/jupiter/core/repository/sqlite/infra/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def _serialize_event(
"""Transform an event into a serialisation-ready dictionary."""
serialized_frame_args: dict[str, RealmThing] = {}
for the_key, (the_value, the_value_type) in event.frame_args.items():
encoder = realm_codec_registry.get_encoder(the_value_type, EventStoreRealm)
try:
encoder = realm_codec_registry.get_encoder(the_value_type, EventStoreRealm)
except Exception:
encoder = realm_codec_registry.get_encoder(the_value.__class__, EventStoreRealm)
serialized_frame_args[the_key] = encoder.encode(the_value)
return serialized_frame_args

Expand Down

0 comments on commit 8f59e6f

Please sign in to comment.