Esempio n. 1
0
 def _obj_check_relation(self, name):
     if name in self.FIELDS and self.FIELDS[name].get('relation', False):
         if not self.obj_attr_is_set(name):
             raise exceptions.RelationNotLoaded(object=self, relation=name)
Esempio n. 2
0
 def _obj_check_relation(self, name):
     if name in self.fields:
         if hasattr(self.fields.get(name), 'objname'):
             if not self.obj_attr_is_set(name):
                 raise exceptions.RelationNotLoaded(object=self,
                                                    relation=name)