Add and fix tests
This commit is contained in:
@@ -269,11 +269,10 @@ async def new_product_post(
|
||||
session: SessionDep,
|
||||
user: UserDep,
|
||||
product_data: Annotated[types.Product, Form()],
|
||||
# product_image: Annotated[bytes, File()]
|
||||
):
|
||||
if not user.has_permission("product", "edit"):
|
||||
raise HTTPException(status_code=403, detail="Insufficient permissions")
|
||||
# print(len(product_image))
|
||||
|
||||
product = Product()
|
||||
|
||||
for field_name, data in product_data.model_dump().items():
|
||||
|
||||
Reference in New Issue
Block a user