Ejemplo n.º 1
0
 def get_child(self, saved, idx):
     from helpers import safe_bool
     
     if safe_bool(saved):
         return self.get_child_in_db(idx)
     else:
         return self.get_child_in_session(idx)
Ejemplo n.º 2
0
    def remove_comment(self, saved, comment_id):
        from helpers import safe_bool

        if safe_bool(saved):
            return self.remove_comment_in_db(int(comment_id))
        else:
            return self.remove_comment_in_session(int(comment_id))