diff --git a/stcheck.py b/stcheck.py index e82edc0de3de12bbeb80675fb0580a48c6383114_c3RjaGVjay5weQ==..4239093674fe5bd7aec8926bbea6c38da32f2031_c3RjaGVjay5weQ== 100644 --- 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 index e82edc0de3de12bbeb80675fb0580a48c6383114_dGVzdC91bml0dGVzdF9zdGNoZWNrLnB5..4239093674fe5bd7aec8926bbea6c38da32f2031_dGVzdC91bml0dGVzdF9zdGNoZWNrLnB5 100644 --- 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', )