From bfc503c5d395fb8ef5f9faecb35922bcfcc1c711 Mon Sep 17 00:00:00 2001 From: s3lph Date: Sun, 5 May 2024 00:21:04 +0200 Subject: [PATCH] feat: sort products in list --- CHANGELOG.md | 13 +++++++++++++ matemat/__init__.py | 2 +- matemat/db/facade.py | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b2759d2..28a9033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Matemat Changelog + +## Version 0.3.12 + +Sort products + +### Changes + + +- Sort products in the list + + + + ## Version 0.3.11 diff --git a/matemat/__init__.py b/matemat/__init__.py index 5616a14..236fab7 100644 --- a/matemat/__init__.py +++ b/matemat/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.3.11' +__version__ = '0.3.12' diff --git a/matemat/db/facade.py b/matemat/db/facade.py index 4bfed61..36f6e05 100644 --- a/matemat/db/facade.py +++ b/matemat/db/facade.py @@ -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))