Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Horia Coman committed Feb 12, 2024
1 parent 62197d9 commit e8ae877
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/jupiter/core/repository/sqlite/infra/events.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Common toolin for SQLite repositories."""
from typing import cast
from jupiter.core.framework import thing
from jupiter.core.framework.base.entity_id import EntityId
from jupiter.core.framework.entity import Entity
from jupiter.core.framework.event import Event
from jupiter.core.framework.realm import DatabaseRealm, RealmCodecRegistry, RealmThing
from jupiter.core.framework.thing import Thing
from jupiter.core.framework.utils import is_thing_ish_type
from sqlalchemy import (
JSON,
Expand Down Expand Up @@ -76,7 +76,7 @@ def _serialize_event(realm_codec_registry: RealmCodecRegistry, event: Event) ->
if not is_thing_ish_type(the_value.__class__):
raise Exception(f"The domain should deal with things, but found {the_value.__class__}")
encoder = realm_codec_registry.get_encoder(the_value.__class__, DatabaseRealm)
serialized_frame_args[the_key] = encoder.encode(cast(thing, the_value))
serialized_frame_args[the_key] = encoder.encode(cast(Thing, the_value))
return serialized_frame_args


Expand Down

0 comments on commit e8ae877

Please sign in to comment.