aboutsummaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorAndrea Lepori <alepori@student.ethz.ch>2020-08-31 23:23:13 +0200
committerAndrea Lepori <alepori@student.ethz.ch>2020-08-31 23:23:13 +0200
commit923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf (patch)
treecb21c15b17bf132981e67e9718cf2e4708954dd5 /client
parentchange accent color, apply color to more component (diff)
downloadscout-subs-923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf.tar.gz
scout-subs-923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf.zip
bug fix: multiple docs same type
Diffstat (limited to 'client')
-rw-r--r--client/views.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/views.py b/client/views.py
index 01909d7..eb2586a 100644
--- a/client/views.py
+++ b/client/views.py
@@ -184,7 +184,7 @@ def create(request):
id=request.POST["doctype"])
# get list of docs with that type
- current_docs = Document.objects.filter(document_type=document_type)
+ current_docs = Document.objects.filter(user=request.user).filter(document_type=document_type)
if len(current_docs) > 0:
# if there is already a document with that type abort (user is cheating)
return