aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-07-31 14:12:21 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-07-31 14:12:21 +0200
commit4fd7f5a580d45be75018f1f3ddf6182dbefa0edc (patch)
treeb75ca4c41b5cc97a0a9d298b7b2fff1a90ce997b /server
parentself delete of medical data (diff)
downloadscout-subs-4fd7f5a580d45be75018f1f3ddf6182dbefa0edc.tar.gz
scout-subs-4fd7f5a580d45be75018f1f3ddf6182dbefa0edc.zip
requirements for python
Diffstat (limited to '')
-rw-r--r--server/views.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/views.py b/server/views.py
index b4bd06e..01e8109 100644
--- a/server/views.py
+++ b/server/views.py
@@ -33,7 +33,7 @@ def index(request):
context = {}
parent_group = request.user.groups.values_list('name', flat=True)[
0]
- users = User.objects.filter(groups__name=parent_group).order_by("id")
+ users = User.objects.filter(groups__name=parent_group).order_by("-id")
users_out = []
for user in users:
@@ -48,10 +48,10 @@ def index(request):
group = Group.objects.get(name=parent_group)
if request.user.is_staff:
public_types = DocumentType.objects.filter(
- Q(group_private=False) | Q(group=group) & Q(enabled=True))
+ Q(group_private=False) | Q(group=group) & Q(enabled=True)).order_by("-id")
else:
public_types = DocumentType.objects.filter(
- Q(group_private=False) & Q(enabled=True))
+ Q(group_private=False) & Q(enabled=True)).order_by("-id")
docs = []
for doc in public_types:
ref_docs = Document.objects.filter(document_type=doc)