Странный комменатрии оставленный в 5 утра...

This commit is contained in:
maksim 2024-10-06 00:35:20 +04:00
parent 761cc83ebd
commit bde242318f

View File

@ -16,7 +16,6 @@ def handle_faculties():
dto = request.get_json()['dto'] dto = request.get_json()['dto']
faculty = faculty_service.create_faculty(dto['name'], dto['university_id']) faculty = faculty_service.create_faculty(dto['name'], dto['university_id'])
# Проверьте, является ли faculty словарем или объектом
if isinstance(faculty, dict): if isinstance(faculty, dict):
return jsonify({"id": faculty['id'], "name": faculty['name'], "university_id": faculty['university_id']}) return jsonify({"id": faculty['id'], "name": faculty['name'], "university_id": faculty['university_id']})