From 5a9ea98dbccde479fb21d41178719c8b00a7d987 Mon Sep 17 00:00:00 2001 From: AaDalal <57609353+AaDalal@users.noreply.github.com> Date: Sat, 12 Aug 2023 15:14:18 -0400 Subject: [PATCH] Fix local dev set up + move filter imports --- .../courses/management/commands/dump_redis_data.py | 13 +------------ backend/docker-compose.yaml | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/backend/courses/management/commands/dump_redis_data.py b/backend/courses/management/commands/dump_redis_data.py index 1ae71f5d8..f9e988c56 100644 --- a/backend/courses/management/commands/dump_redis_data.py +++ b/backend/courses/management/commands/dump_redis_data.py @@ -12,18 +12,7 @@ from courses.models import Course, Topic, Department, Instructor, Section from review.annotations import annotate_average_and_recent from review.util import get_average_and_recent_dict_single - - -course_filters_pcr_allow_xlist = ~Q(title="") | ~Q(description="") | Q(sections__has_reviews=True) -course_filters_pcr = Q(primary_listing_id=F("id")) & course_filters_pcr_allow_xlist -course_filters_pcr_allow_xlist = ~Q(title="") | ~Q(description="") | Q(sections__has_reviews=True) - -section_filters_pcr = Q(course__primary_listing_id=F("course_id")) & ( - Q(has_reviews=True) - | ((~Q(course__title="") | ~Q(course__description="")) & ~Q(activity="REC") & ~Q(status="X")) -) - -review_filters_pcr = Q(section__course__primary_listing_id=F("section__course_id")) +from review.views import course_filters_pcr, section_filters_pcr, review_filters_pcr def get_department_objs(): departments = Department.objects.all() diff --git a/backend/docker-compose.yaml b/backend/docker-compose.yaml index e525da21e..3e25471f9 100644 --- a/backend/docker-compose.yaml +++ b/backend/docker-compose.yaml @@ -13,7 +13,7 @@ services: volumes: - ./postgres:/var/lib/postgresql/data redis: - image: redis/redis-stack:6.2.6 # TODO: make sure this is not a breaking version + image: redis/redis-stack # TODO: make sure this is not a breaking version ports: - "6379:6379" development: