From c6f3912efb5222a9b2242220e95f2d24db341c75 Mon Sep 17 00:00:00 2001 From: yaso-meth Date: Thu, 4 Jul 2024 16:55:32 +0200 Subject: [PATCH] medicine api --- backend/routers/medicine.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/backend/routers/medicine.py b/backend/routers/medicine.py index 6cd0c6f7..82bc1eb7 100644 --- a/backend/routers/medicine.py +++ b/backend/routers/medicine.py @@ -2,7 +2,6 @@ from fastapi import APIRouter, HTTPException from pydantic import BaseModel import os import xlrd -#from pathlib import Path router = APIRouter() @@ -46,10 +45,7 @@ def getMedicineData(): if t not in seen: seen.add(t) medlist_noDuplicates.append(d) - - #medlist_noDuplicates[:] = [d for d in thelist if d.get('id') != 2] - - + return sorted(medlist_noDuplicates, key=lambda d: d['name']) #qsort(medlist)