fix
This commit is contained in:
parent
cbdbf53acd
commit
7a92bacd61
@ -3842,6 +3842,8 @@
|
|||||||
" update_doc[\"status\"] = -1\n",
|
" update_doc[\"status\"] = -1\n",
|
||||||
" if payload.date_finish is not None:\n",
|
" if payload.date_finish is not None:\n",
|
||||||
" update_doc[\"date_finish\"] = payload.date_finish\n",
|
" update_doc[\"date_finish\"] = payload.date_finish\n",
|
||||||
|
" if datetime.now(timezone.utc) + timedelta(hours=3) > payload.datetime_start:\n",
|
||||||
|
" update_doc[\"status\"] = 0\n",
|
||||||
" if payload.address is not None:\n",
|
" if payload.address is not None:\n",
|
||||||
" await users_collection.update_one(\n",
|
" await users_collection.update_one(\n",
|
||||||
" { \"_id\": ObjectId(current_user[\"_id\"]) },\n",
|
" { \"_id\": ObjectId(current_user[\"_id\"]) },\n",
|
||||||
|
|||||||
2
main.py
2
main.py
@ -2918,6 +2918,8 @@ async def put_competition(
|
|||||||
update_doc["status"] = -1
|
update_doc["status"] = -1
|
||||||
if payload.date_finish is not None:
|
if payload.date_finish is not None:
|
||||||
update_doc["date_finish"] = payload.date_finish
|
update_doc["date_finish"] = payload.date_finish
|
||||||
|
if datetime.now(timezone.utc) + timedelta(hours=3) > payload.datetime_start:
|
||||||
|
update_doc["status"] = 0
|
||||||
if payload.address is not None:
|
if payload.address is not None:
|
||||||
await users_collection.update_one(
|
await users_collection.update_one(
|
||||||
{ "_id": ObjectId(current_user["_id"]) },
|
{ "_id": ObjectId(current_user["_id"]) },
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user