No longer need to specify entity_type in body

This commit is contained in:
Donkie
2024-01-06 17:16:15 +01:00
parent 77ac9d6a5c
commit 06e3849862
2 changed files with 2 additions and 2 deletions

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)