You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, if a model has a polymorphic_identity as an Enum, they keys of the sub_serializers are a dict who's keys are enums, so self.sub_serializers.get(model_identity) returns None because model_identity is a string
def load(self, serialized, existing_model=None, session=None):
if self.is_polymorphic:
model_identity = serialized.get(self.identity_key)
if model_identity and self.sub_serializers.get(model_identity):
return self.sub_serializers[model_identity].load(
serialized, existing_model, session
)
return super().load(serialized, existing_model, session)
The text was updated successfully, but these errors were encountered:
Right now, if a model has a
polymorphic_identity
as an Enum, they keys of thesub_serializers
are a dict who's keys are enums, soself.sub_serializers.get(model_identity)
returns None becausemodel_identity
is a stringThe text was updated successfully, but these errors were encountered: