Commits

Anonymous committed a34a0f0 Draft

add a warning if a ticket is assigned to non-existant user, but only for 'reassign' actions

git-svn-id: https://svn.apache.org/repos/asf/bloodhound/trunk@146879213f79535-47bb-0310-9956-ffa450edef68

Comments (0)

Files changed (1)

bloodhound_multiproduct/multiproduct/api.py

     # ITicketManipulator methods
     def validate_ticket(self, req, ticket):
         # check whether the owner exists in db, add a warning if not
-        if ticket['owner'] != self.env.config.get('ticket', 'default_owner'):
+        if req.args.get('action') == 'reassign' and \
+           ticket['owner'] != self.env.config.get('ticket', 'default_owner'):
             owner = self.env.db_direct_query(
                 "SELECT sid FROM session WHERE sid=%s",
                 (ticket['owner'], ))