change to hidden field and dummy inputs

This commit is contained in:
Thomas White
2023-08-21 02:40:07 +08:00
parent eea74b8a43
commit 312aad55c0
2 changed files with 73 additions and 146 deletions

View File

@@ -158,11 +158,11 @@ async def create( # noqa: ANN201
db: Annotated[AsyncSession, Depends(get_db_session)],
body: SpoolParameters,
):
#if body.remaining_weight is not None and body.used_weight is not None:
# return JSONResponse(
# status_code=400,
# content={"message": "Only specify either remaining_weight or used_weight."},
# )
if body.remaining_weight is not None and body.used_weight is not None:
return JSONResponse(
status_code=400,
content={"message": "Only specify either remaining_weight or used_weight."},
)
try:
db_item = await spool.create(