We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c049903 commit 65ced45Copy full SHA for 65ced45
packages/models-library/src/models_library/utils/json_serialization.py
@@ -105,10 +105,11 @@ def pydantic_encoder(obj: Any) -> Any:
105
except KeyError:
106
continue
107
return encoder(obj)
108
- else: # We have exited the for loop without finding a suitable encoder
109
- raise TypeError(
110
- f"Object of type '{obj.__class__.__name__}' is not JSON serializable"
111
- )
+
+ # We have exited the for loop without finding a suitable encoder
+ raise TypeError(
+ f"Object of type '{obj.__class__.__name__}' is not JSON serializable"
112
+ )
113
114
115
def json_dumps(
0 commit comments