def ajax_tendency_psy(): uid = request.args.get('uid', '') uid = str(uid) results = search_tendency_psy(uid) if not results: results = {} return json.dumps(results)