- # ref_record contains the target values for the various relationships we need to manage
- # (to begin with, this is just the slice x person (researcher) and authority x person (pi) relationships)
- def update_driver_relations (self, api, subject_obj, ref_obj):
- type=subject_obj.type
- #for (k,v) in subject_obj.__dict__.items(): print k,'=',v
- if type=='slice' and hasattr(ref_obj,'researcher'):
- self.update_driver_relation(api, subject_obj, ref_obj.researcher, 'user', 'researcher')
- elif type=='authority' and hasattr(ref_obj,'pi'):
- self.update_driver_relation(api, subject_obj,ref_obj.pi, 'user', 'pi')
-
- # field_key is the name of one field in the record, typically 'researcher' for a 'slice' record
+ # ref_record contains the target values for the various relationships
+ # we need to manage (to begin with, this is just the
+ # slice x person (researcher) and authority x person (pi) relationships)
+ def update_driver_relations(self, api, subject_obj, ref_obj):
+ type = subject_obj.type
+ # for (k,v) in subject_obj.__dict__.items(): print k,'=',v
+ if type == 'slice' and hasattr(ref_obj, 'researcher'):
+ self.update_driver_relation(
+ api, subject_obj, ref_obj.researcher, 'user', 'researcher')
+ elif type == 'authority' and hasattr(ref_obj, 'pi'):
+ self.update_driver_relation(
+ api, subject_obj, ref_obj.pi, 'user', 'pi')
+
+ # field_key is the name of one field in the record,
+ # typically 'researcher' for a 'slice' record