From cb2cb652df7b008826eaa6a044f9c46051d73e03d27033f5e10cd3f5eac950ab Mon Sep 17 00:00:00 2001 From: vladislav Date: Thu, 3 Sep 2026 04:32:03 -0400 Subject: [PATCH] fix --- main.ipynb | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ipynb b/main.ipynb index 6ec7433..ca75276 100644 --- a/main.ipynb +++ b/main.ipynb @@ -5013,7 +5013,7 @@ " 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 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('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", " 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", diff --git a/main.py b/main.py index 273bdc6..b8e61b1 100644 --- a/main.py +++ b/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() for post in 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('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')}) 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}