def add_or_update(self, app_id):
        '''
        Add or update the category.
        '''
        logger.info('Collect info: user-{0}, uid-{1}'.format(self.userinfo.uid, app_id))
        MCollect.add_or_update(self.userinfo.uid, app_id)
        out_dic = {'success': True}
        return json.dump(out_dic, self)
def add_or_update ( self , app_id ) : logger . info ( 'Collect info: user-{0}, uid-{1}' . format ( self . userinfo . uid , app_id ) ) MCollect . add_or_update ( self . userinfo . uid , app_id ) out_dic = { 'success' : True } return json . dump ( out_dic , self )
Add or update the category.