Fix query validation to exclude unique check when editing queries.
Fix query validation to exclude unique check when editing queries.

This was introduced with patch 11416.

Change-Id: I9d98e52038352767f0e008396162515291dca6ca
(cherry picked from commit 5033972f92cf5c25a552b7a5d4e76bd3479059ba)

Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server