Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
464 B
1
Indexable
Never
 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'"
}