server/querier.py
branchstable
changeset 3689 deb13e88e037
parent 3240 8604a15995d1
child 3877 7ca53fc72a0a
child 4212 ab6573088b4a
equal deleted inserted replaced
3688:421fb447ecb2 3689:deb13e88e037
   387             else:
   387             else:
   388                 if isinstance(rhs, Constant) and not rhs.uid:
   388                 if isinstance(rhs, Constant) and not rhs.uid:
   389                     # add constant values to entity def
   389                     # add constant values to entity def
   390                     value = rhs.eval(self.args)
   390                     value = rhs.eval(self.args)
   391                     eschema = edef.e_schema
   391                     eschema = edef.e_schema
   392                     attrtype = eschema.subject_relation(rtype).objects(eschema)[0]
   392                     attrtype = eschema.subjrels[rtype].objects(eschema)[0]
   393                     if attrtype == 'Password' and isinstance(value, unicode):
   393                     if attrtype == 'Password' and isinstance(value, unicode):
   394                         value = value.encode('UTF8')
   394                         value = value.encode('UTF8')
   395                     edef[rtype] = value
   395                     edef[rtype] = value
   396                 elif to_build.has_key(str(rhs)):
   396                 elif to_build.has_key(str(rhs)):
   397                     # create a relation between two newly created variables
   397                     # create a relation between two newly created variables