diff -r caea22e82d83 -r fb8acdab4e12 server/schemaserial.py --- a/server/schemaserial.py Tue Jul 13 16:07:41 2010 +0200 +++ b/server/schemaserial.py Tue Jul 13 17:21:57 2010 +0200 @@ -26,7 +26,7 @@ from yams import schema as schemamod, buildobjs as ybo -from cubicweb import CW_SOFTWARE_ROOT +from cubicweb import CW_SOFTWARE_ROOT, typed_eid from cubicweb.schema import (CONSTRAINTS, ETYPE_NAME_MAP, VIRTUAL_RTYPES, PURE_VIRTUAL_RTYPES) from cubicweb.server import sqlutils @@ -58,10 +58,18 @@ if not value: continue try: - res[group] = int(value) + eid = typed_eid(value) except ValueError: print 'eid should be an integer' continue + for eid_ in res.values(): + if eid == eid_: + break + else: + print 'eid is not a group eid' + continue + res[name] = eid + break return res def cstrtype_mapping(cursor):