feat: sort products in list
All checks were successful
/ test (push) Successful in 49s
/ codestyle (push) Successful in 46s
/ build_wheel (push) Successful in 1m9s
/ build_debian (push) Successful in 2m13s

This commit is contained in:
s3lph 2024-05-05 00:21:04 +02:00
parent d41484e69a
commit bfc503c5d3
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5
3 changed files with 15 additions and 2 deletions

View file

@ -1,5 +1,18 @@
# Matemat Changelog
<!-- BEGIN RELEASE v0.3.12 -->
## Version 0.3.12
Sort products
### Changes
<!-- BEGIN CHANGES 0.3.12 -->
- Sort products in the list
<!-- END CHANGES 0.3.12 -->
<!-- END RELEASE v0.3.12 -->
<!-- BEGIN RELEASE v0.3.11 -->
## Version 0.3.11

View file

@ -1,2 +1,2 @@
__version__ = '0.3.11'
__version__ = '0.3.12'

View file

@ -368,7 +368,7 @@ class MatematDatabase(object):
with self.db.transaction(exclusive=False) as c:
for row in c.execute('''
SELECT product_id, name, price_member, price_non_member, custom_price, stock, stockable
FROM products
FROM products ORDER BY name
'''):
product_id, name, price_member, price_external, custom_price, stock, stockable = row
products.append(Product(product_id, name, price_member, price_external, custom_price, stockable, stock))