No longer need to specify entity_type in body
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user