Untitled
if recommendations is not None: print("Recommended users for the ticket are-") print("Recommendations : ",recommendations) return recommendations.to_json() else: return jsonify({"error": "No recommendation found"}) except Exception as e: return jsonify({"error": str(e)}), 500 But gettng error as - { "error": "'list' object has no attribute 'to_json'" }