Skip to content

Commit

Permalink
Fix local dev set up + move filter imports
Browse files Browse the repository at this point in the history
  • Loading branch information
AaDalal committed Aug 12, 2023
1 parent ee6a901 commit 5a9ea98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
13 changes: 1 addition & 12 deletions backend/courses/management/commands/dump_redis_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5a9ea98

Please sign in to comment.