fix
This commit is contained in:
parent
cacaf9fb64
commit
9b85b270e3
@ -3277,6 +3277,12 @@
|
||||
" new_doc = {**existing, **update_data, \"notify\": notify.upserted_id}\n",
|
||||
"\n",
|
||||
" result = await delivery_collection.insert_one(new_doc)\n",
|
||||
" else:\n",
|
||||
" doc = await posts_collection.update_one({'$or': fin}, {'$set': {\"status\": \"В каталоге\"}})\n",
|
||||
" await delivery_collection.delete_one(\n",
|
||||
" {\"post_id\": post_id, \"status\": \"Продано\"}\n",
|
||||
" )\n",
|
||||
"\n",
|
||||
" return {'ok': True}"
|
||||
],
|
||||
"display_name": ".venv"
|
||||
|
||||
6
main.py
6
main.py
@ -2443,6 +2443,12 @@ async def sale_painting(
|
||||
new_doc = {**existing, **update_data, "notify": notify.upserted_id}
|
||||
|
||||
result = await delivery_collection.insert_one(new_doc)
|
||||
else:
|
||||
doc = await posts_collection.update_one({'$or': fin}, {'$set': {"status": "В каталоге"}})
|
||||
await delivery_collection.delete_one(
|
||||
{"post_id": post_id, "status": "Продано"}
|
||||
)
|
||||
|
||||
return {'ok': True}
|
||||
|
||||
@app.put("/api/post/{post_id}", response_model=dict)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user