+ # locate objects for relationships
+ pi_hrns = getattr(record,'pi',None)
+ if pi_hrns is not None: record.update_pis (pi_hrns)
+
+ elif isinstance (record, RegSlice):
+ researcher_hrns = getattr(record,'researcher',None)
+ if researcher_hrns is not None: record.update_researchers (researcher_hrns)
+
+ elif isinstance (record, RegUser):
+ # create RegKey objects for incoming keys
+ if hasattr(record,'keys'):
+ logger.debug ("creating %d keys for user %s"%(len(record.keys),record.hrn))
+ record.reg_keys = [ RegKey (key) for key in record.keys ]
+