No longer need to specify entity_type in body

This commit is contained in:
Donkie
2024-01-23 18:58:57 +01:00
parent 77ac9d6a5c
commit 06e3849862
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ async def update(
key: Annotated[str, Path(min_length=1, max_length=64, regex="^[a-z0-9_]+$")],
body: ExtraFieldParameters,
) -> Union[list[ExtraField], JSONResponse]:
body_with_key = ExtraField.parse_obj(body.copy(update={"key": key}))
body_with_key = ExtraField.parse_obj(body.copy(update={"key": key, "entity_type": entity_type}))
try:
await add_or_update_extra_field(db, entity_type, body_with_key)