From 923cff9b2489bfaaba8ae802e0bdf7f35a67ffaf Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 31 Aug 2020 23:23:13 +0200 Subject: bug fix: multiple docs same type --- client/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/views.py') 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 -- cgit v1.2.1