# HG changeset patch
# User Aurelien Campeas <aurelien.campeas@logilab.fr>
# Date 1398254342 -7200
#      Wed Apr 23 13:59:02 2014 +0200
# Node ID 4239093674fe5bd7aec8926bbea6c38da32f2031
# Parent  e82edc0de3de12bbeb80675fb0580a48c6383114
[stcheck] remove overzealous check (closes #240176)

Allow multiple (non "=") operators for uid variables.

diff --git a/stcheck.py b/stcheck.py
--- a/stcheck.py
+++ b/stcheck.py
@@ -375,7 +375,7 @@
                 if rschema.final and relation.optional not in (None, 'right'):
                      state.error("optional may only be set on the rhs on final relation `%s`"
                                  % relation.r_type)
-                if self.special_relations.get(rtype) == 'uid':
+                if self.special_relations.get(rtype) == 'uid' and relation.operator() == '=':
                     if state.var_info.get(lhsvar, 0) & VAR_HAS_UID_REL:
                         state.error('can only one uid restriction per variable '
                                     '(use IN for %s if desired)' % lhsvar.name)
diff --git a/test/unittest_stcheck.py b/test/unittest_stcheck.py
--- a/test/unittest_stcheck.py
+++ b/test/unittest_stcheck.py
@@ -81,6 +81,8 @@
     'DISTINCT Any P ORDERBY PN WHERE P work_for X, P name PN',
     'DISTINCT Any P ORDERBY XN WHERE P work_for X, X name XN',
 
+    'Any X WHERE X eid > 0, X eid < 42',
+    'Any X WHERE X eid 1, X eid < 42',
 
 
     )