fix
This commit is contained in:
parent
cb2cb652df
commit
b4a223948a
@ -5013,7 +5013,7 @@
|
|||||||
" d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()\n",
|
" d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()\n",
|
||||||
" for post in posts:\n",
|
" for post in posts:\n",
|
||||||
" for doc in d_posts:\n",
|
" for doc in d_posts:\n",
|
||||||
" if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):\n",
|
" if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):\n",
|
||||||
" post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})\n",
|
" post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})\n",
|
||||||
" return templates.TemplateResponse(\n",
|
" return templates.TemplateResponse(\n",
|
||||||
" request=request, name=\"profile/partner/exhibition catalog.html\", context={\"now\": datetime.now(), \"user\": user, \"galerists\": galerists, \"genres\": genres, \"living_places\": living_places, \"exhibition\": exhibition, \"posts\": posts}\n",
|
" request=request, name=\"profile/partner/exhibition catalog.html\", context={\"now\": datetime.now(), \"user\": user, \"galerists\": galerists, \"genres\": genres, \"living_places\": living_places, \"exhibition\": exhibition, \"posts\": posts}\n",
|
||||||
@ -5040,7 +5040,7 @@
|
|||||||
" d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()\n",
|
" d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()\n",
|
||||||
" for post in posts:\n",
|
" for post in posts:\n",
|
||||||
" for doc in d_posts:\n",
|
" for doc in d_posts:\n",
|
||||||
" if str(post.get('_id')) == doc.get('post_id') and post.get('status') != 'Продано' and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):\n",
|
" if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):\n",
|
||||||
" post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})\n",
|
" post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})\n",
|
||||||
" return templates.TemplateResponse(\n",
|
" return templates.TemplateResponse(\n",
|
||||||
" request=request, name=\"profile/partner/exhibition.html\", context={\"now\": datetime.now(), \"user\": user, \"exhibition\": exhibition, \"posts\": posts}\n",
|
" request=request, name=\"profile/partner/exhibition.html\", context={\"now\": datetime.now(), \"user\": user, \"exhibition\": exhibition, \"posts\": posts}\n",
|
||||||
|
|||||||
4
main.py
4
main.py
@ -3858,7 +3858,7 @@ async def profile_partner_exhibitions_catalog(
|
|||||||
d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()
|
d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()
|
||||||
for post in posts:
|
for post in posts:
|
||||||
for doc in d_posts:
|
for doc in d_posts:
|
||||||
if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):
|
if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):
|
||||||
post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})
|
post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
request=request, name="profile/partner/exhibition catalog.html", context={"now": datetime.now(), "user": user, "galerists": galerists, "genres": genres, "living_places": living_places, "exhibition": exhibition, "posts": posts}
|
request=request, name="profile/partner/exhibition catalog.html", context={"now": datetime.now(), "user": user, "galerists": galerists, "genres": genres, "living_places": living_places, "exhibition": exhibition, "posts": posts}
|
||||||
@ -3877,7 +3877,7 @@ async def profile_partner_exhibitions(
|
|||||||
d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()
|
d_posts = await delivery_collection.find({'post_id':{'$in':[str(i.get('_id')) for i in posts]}}).to_list()
|
||||||
for post in posts:
|
for post in posts:
|
||||||
for doc in d_posts:
|
for doc in d_posts:
|
||||||
if str(post.get('_id')) == doc.get('post_id') and post.get('status') != 'Продано' and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):
|
if str(post.get('_id')) == doc.get('post_id') and post.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('status') not in ['Продано', 'Приглашение откланено'] and doc.get('receiver') and doc.get('receiver').get('_id') == str(user.get('_id')):
|
||||||
post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})
|
post.update({'status':doc.get('status'), 'receiver': doc.get('receiver'), 'd_id':doc.get('_id')})
|
||||||
return templates.TemplateResponse(
|
return templates.TemplateResponse(
|
||||||
request=request, name="profile/partner/exhibition.html", context={"now": datetime.now(), "user": user, "exhibition": exhibition, "posts": posts}
|
request=request, name="profile/partner/exhibition.html", context={"now": datetime.now(), "user": user, "exhibition": exhibition, "posts": posts}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user