Skip to content

Commit

Permalink
undo workaround given fix
Browse files Browse the repository at this point in the history
undo workaround given fix
  • Loading branch information
zzstoatzz committed Nov 22, 2024
1 parent 917a2d2 commit 826b6d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion requirements-client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ packaging >= 21.3, < 24.3
pathspec >= 0.8.0
pendulum >= 3.0.0, <4
prometheus-client >= 0.20.0
pydantic >= 2.7, < 3.0.0
pydantic >= 2.7, < 3.0.0, != 2.10.0
pydantic_core >= 2.12.0, < 3.0.0
pydantic_extra_types >= 2.8.2, < 3.0.0
pydantic_settings > 2.2.1
Expand Down
5 changes: 1 addition & 4 deletions src/prefect/_internal/schemas/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,9 @@ def reset_fields(self: Self) -> Self:
Returns:
PrefectBaseModel: A new instance of the model with the reset fields.
"""
data = self.model_dump()
return self.model_copy(
update={
field: self.model_fields[field].get_default(
call_default_factory=True, validated_data=data
)
field: self.model_fields[field].get_default(call_default_factory=True)
for field in self._reset_fields
}
)
Expand Down
5 changes: 1 addition & 4 deletions src/prefect/server/utilities/schemas/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,9 @@ def reset_fields(self: Self) -> Self:
Returns:
PrefectBaseModel: A new instance of the model with the reset fields.
"""
data = self.model_dump()
return self.model_copy(
update={
field: self.model_fields[field].get_default(
call_default_factory=True, validated_data=data
)
field: self.model_fields[field].get_default(call_default_factory=True)
for field in self._reset_fields
}
)
Expand Down

0 comments on commit 826b6d3

Please sign in to comment.