diff --git a/SocialHelper/homepage/__pycache__/views.cpython-37.pyc b/SocialHelper/homepage/__pycache__/views.cpython-37.pyc index 534ec63..9552f06 100644 Binary files a/SocialHelper/homepage/__pycache__/views.cpython-37.pyc and b/SocialHelper/homepage/__pycache__/views.cpython-37.pyc differ diff --git a/SocialHelper/homepage/views.py b/SocialHelper/homepage/views.py index e1048a4..167543a 100644 --- a/SocialHelper/homepage/views.py +++ b/SocialHelper/homepage/views.py @@ -134,19 +134,19 @@ def filter(request): if oddam_local == "on" and potrzebuje_local != "on": zmienna = 2 - all_product = all_product.filter(type=zmienna) + all_product = all_product.filter(type=2) if oddam_local != "on" and potrzebuje_local == "on": zmienna = 1 - all_product = all_product.filter(type=zmienna) + all_product = all_product.filter(type=1) if usluga_local == "on" and przedmiot_local != "on": zmienna = 1 - all_product = all_product.filter(type=zmienna) + all_product = all_product.filter(offer=1) if usluga_local != "on" and przedmiot_local == "on": zmienna = 2 - all_product = all_product.filter(type=zmienna) + all_product = all_product.filter(offer=2) if wol_local == "on": all_product = all_product.filter(Wolontatriat=True) @@ -519,7 +519,7 @@ def offer(request, offer_id): user_list = chat.objects.values_list('author_id', flat=True).distinct('author_id').filter(product_id = offer_id, sec_user_id = request.user.id).exclude(author_id = request.user.id) User = get_user_model() email_list = User.objects.filter(id__in = user_list) - else: + else: user_list = chat.objects.none() email_list = chat.objects.none()