1
0
Fork 0
forked from s3lph/matemat

feat: sort products in list

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

View file

@ -1,5 +1,18 @@
# Matemat Changelog # 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 --> <!-- BEGIN RELEASE v0.3.11 -->
## Version 0.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: with self.db.transaction(exclusive=False) as c:
for row in c.execute(''' for row in c.execute('''
SELECT product_id, name, price_member, price_non_member, custom_price, stock, stockable 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 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)) products.append(Product(product_id, name, price_member, price_external, custom_price, stockable, stock))