]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
parser: Log when invalid project list-id passed
authorStephen Finucane <stephen@that.guru>
Thu, 4 Jan 2018 15:43:41 +0000 (15:43 +0000)
committerStephen Finucane <stephen@that.guru>
Tue, 9 Jan 2018 23:58:42 +0000 (23:58 +0000)
I thought there was a bug. Turns out I was just using the wrong list-id.
Make this clearer.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/parser.py

index 1568bc446287ed8a2e57e5e3b85fa5c5d457d67b..05249df078160f3b65f74a87d31e11926ea21769 100644 (file)
@@ -156,7 +156,7 @@ def find_project_by_id(list_id):
     try:
         project = Project.objects.get(listid=list_id)
     except Project.DoesNotExist:
-        pass
+        logger.debug("'%s' if not a valid project list-id", list_id)
     return project
 
 
@@ -185,6 +185,9 @@ def find_project_by_header(mail):
             if project:
                 break
 
+    if not project:
+        logger.debug("Could not find a list-id in mail headers", list_id)
+
     return project