Beispiel #1
0
 def getter(self):
     ans = About.by_id(self.data['about_id'])
     if ans is None:
         ans = About()
         self.data['about_id'] = ans._id
         ans.set_propertys(author_id=self.data['owner_id'], env=self)
         return ans, True
     if not ans.author_id or not ans.env_id or not ans.env_type:
         ans.set_propertys(author_id=self.data['owner_id'], env=self)
     return ans
Beispiel #2
0
 def getter(self):
     ans = About.by_id(self.data['about_id'])
     if ans is None:
         ans = About()
         self.data['about_id'] = ans._id
         ans.set_propertys(author_id=self.data['owner_id'], env=self)
         return ans, True
     if not ans.author_id or not ans.env_id or not ans.env_type:
         ans.set_propertys(author_id=self.data['owner_id'], env=self)
     return ans