This commit is contained in:
vladislav 2026-08-17 08:45:39 -04:00
parent 3b3b26bf14
commit 2b8a2e7a02
Signed by: Vladislav
GPG Key ID: D97C9E5E4860EE45
2 changed files with 13 additions and 4 deletions

View File

@ -2041,8 +2041,9 @@
" user['social_vk'] = social_vk\n",
" await invitations_collection.insert_one({\n",
" \"user_id\": data.user_id,\n",
" \"item\": competition['title'],\n",
" \"item\": competition.get('title'),\n",
" \"title\": \"Вы прошли отбор\",\n",
" \"type_\": competition.get(\"type_\"),\n",
" \"user\": user,\n",
" \"prod\": PROD,\n",
" \"type\": \"Конкурс\"\n",

View File

@ -578,7 +578,7 @@
" type_item='competition',\n",
" title='Приглашение на конкурс',\n",
" link=f'/profile/competition/{doc.get(\"id\") or doc.get(\"_id\")}',\n",
" text=f'«{doc['title']}» Организатор {doc['user']['username']}'\n",
" text=f'«{doc['titleaccept_competition_req']}» Организатор {doc['user']['username']}'\n",
" ))\n",
" )\n",
" if PROD:\n",
@ -844,7 +844,7 @@
" user_id=str(user['_id']),\n",
" type_item='invitation',\n",
" title='Приглашение',\n",
" link=f'/profile/delivery',\n",
" link=f'/profile/invitation',\n",
" text=f'Вы прошли отбор на конкурсе \"{competition.get(\"title\")}\"'\n",
" ))\n",
" all_allowed = all(\n",
@ -855,7 +855,15 @@
"\n",
" # Email-уведомление\n",
" if user.get('email') and all_allowed and has_approved:\n",
" print([i['title'] for i in posts_sorted])\n",
" await invitations_collection.insert_one({\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",
" })\n",
" if PROD and user.get('email') and all_allowed and has_approved:\n",
" email_data = {\n",
" 'text': 'Статус заявки обновлен',\n",