order by name
This commit is contained in:
parent
21ea1aa56f
commit
fd3e8751fe
@ -65,7 +65,7 @@ def get_products():
|
||||
try:
|
||||
conn = psycopg2.connect()
|
||||
with conn.cursor() as cursor:
|
||||
cursor.execute('SELECT name FROM nutrition_table')
|
||||
cursor.execute('SELECT name FROM nutrition_table ORDER BY name')
|
||||
products = cursor.fetchall()
|
||||
return {'products': [product[0] for product in products]}
|
||||
finally:
|
||||
|
Loading…
x
Reference in New Issue
Block a user