diff options
author | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-31 23:23:13 +0200 |
---|---|---|
committer | Andrea Lepori <alepori@student.ethz.ch> | 2020-08-31 23:23:13 +0200 |
commit | 923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf (patch) | |
tree | cb21c15b17bf132981e67e9718cf2e4708954dd5 | |
parent | change accent color, apply color to more component (diff) | |
download | scout-subs-923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf.tar.gz scout-subs-923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf.zip |
bug fix: multiple docs same type
-rw-r--r-- | client/views.py | 2 |
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 |