Open
Description
Using a partial "update" Pydantic model to directly update an existing Gel model using the Pydantic model_copy
mechanism fails.
class FooUpdate(BaseModel):
name: str = "Anonymous"
def update_foo(client: gel.Client, foo_in: FooUpdate, foo: Foo):
foo = foo.model_copy(
update=foo_in.model_dump(exclude_unset=True)
)
await client.save(updated)
Will return an error like:
AttributeError: 'Foo' object has no attribute '__gel_changed_fields__'
Metadata
Metadata
Assignees
Labels
No labels