Commits

ezio.melotti  committed b109641

Check that the nodeid is not None when a new issue is created and priority and/or versions are not set

  • Participants
  • Parent commits 43e86ed

Comments (0)

Files changed (1)

File detectors/autonosy.py

         nosy |= set(users)
 
     # get the new values if they changed or the already-set ones if they didn't
-    priority = 'None'
     if 'priority' in newvalues:
         priority_id = newvalues['priority']
+    elif nodeid is not None:
+        priority_id = db.issue.get(nodeid, 'priority')
     else:
-        priority_id = db.issue.get(nodeid, 'priority')
+        priority_id = None
+    priority = 'None'
     if priority_id is not None:
         priority = db.priority.get(priority_id, 'name')
+
+    versions = []
     if 'versions' in newvalues:
         versions = newvalues.get('versions', [])
-    else:
+    elif nodeid is not None:
         versions = db.issue.get(nodeid, 'versions')
 
     if priority == 'release blocker':