This commit is contained in:
vladislav 2026-08-17 08:51:13 -04:00
parent 74ae234fe2
commit f14b0bcabf
Signed by: Vladislav
GPG Key ID: D97C9E5E4860EE45
2 changed files with 20 additions and 4 deletions

View File

@ -2039,7 +2039,7 @@
" social_vk = await social_collection.find_one({'user_id':current_user.get('_id'), 'group': {\"$exists\": False}, 'type':'vk'})\n",
" user = display_user(current_user)\n",
" user['social_vk'] = social_vk\n",
" await invitations_collection.insert_one({\n",
" await invitations_collection.update_one({\n",
" \"user_id\": data.user_id,\n",
" \"item\": competition.get('title'),\n",
" \"title\": \"Вы прошли отбор\",\n",
@ -2047,7 +2047,15 @@
" \"user\": user,\n",
" \"prod\": PROD,\n",
" \"type\": \"Конкурс\"\n",
" })\n",
" },{'$set':{\n",
" \"user_id\": data.user_id,\n",
" \"item\": competition.get('title'),\n",
" \"title\": \"Вы прошли отбор\",\n",
" \"type_\": competition.get(\"type_\"),\n",
" \"user\": user,\n",
" \"prod\": PROD,\n",
" \"type\": \"Конкурс\"\n",
" }},upsert=True)\n",
" return {'ok': True}\n",
" else:\n",
" return {'ok': False}\n"

View File

@ -855,7 +855,7 @@
"\n",
" # Email-уведомление\n",
" if user.get('email') and all_allowed and has_approved:\n",
" await invitations_collection.insert_one({\n",
" await invitations_collection.update_one({\n",
" \"user_id\": str(user['_id']),\n",
" \"item\": competition.get(\"title\"),\n",
" \"title\": \"Вы прошли отбор\",\n",
@ -863,7 +863,15 @@
" \"user\": display_user(competition_owner),\n",
" \"prod\": PROD,\n",
" \"type\": \"Конкурс\"\n",
" })\n",
" },{'$set':{\n",
" \"user_id\": str(user['_id']),\n",
" \"item\": competition.get(\"title\"),\n",
" \"title\": \"Вы прошли отбор\",\n",
" \"type_\": competition.get(\"type_\"),\n",
" \"user\": display_user(competition_owner),\n",
" \"prod\": PROD,\n",
" \"type\": \"Конкурс\"\n",
" }},upsert=True)\n",
" if PROD and user.get('email') and all_allowed and has_approved:\n",
" email_data = {\n",
" 'text': 'Статус заявки обновлен',\n",