Skip to content
Snippets Groups Projects
Commit 12126a6a authored by Alexa Valentová's avatar Alexa Valentová
Browse files

fix lecture query

parent 5565b811
No related branches found
No related tags found
1 merge request!2Release
Pipeline #20131 passed
......@@ -7,3 +7,4 @@ shared/static/shared/*.js
shared/static/shared/*.css
shared/static/shared/*.txt
media/*
.venv
\ No newline at end of file
......@@ -2,7 +2,7 @@ DATABASE_URL="postgresql://ucebnice:ucebnice@localhost:5432/ucebnice"
SECRET_KEY=supersecret
SITE_URL="http://localhost:8013"
SITE_URL="http://localhost:8014"
OIDC_RP_REALM_URL="http://localhost:8080/realms/master/"
OIDC_RP_CLIENT_ID=ucebnice
......
......@@ -182,7 +182,7 @@ class Lecture(NameStrMixin, models.Model):
return LectureGroupType.objects.filter(
lecture=self,
group__in=(
LectureGroup.filter(
LectureGroup.objects.filter(
models.Q(user_groups__in=request.user.groups.all())
if not request.user.is_superuser
else models.Q(id__isnull=False) # Always True
......
......@@ -6,7 +6,7 @@ import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ucebnice.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ucebnice.settings.dev")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
......
......@@ -11,6 +11,6 @@ import os
from django.core.asgi import get_asgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "registry.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "ucebnice.settings.dev")
application = get_asgi_application()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment