Commit graph

14 commits

Author SHA1 Message Date
f7c5fdcf37 Fixes: 1) Remove redundant populate_index calls from core/tasks.py;
Extra: 1) Cleanup unused import for `populate_index`.
2025-06-23 02:31:16 +03:00
a33be30098 Features: 1) Added vendor, product tag, category tag models and metadata; 2) Introduced proper noinspection comments for Mypy warnings; 3) Extended Markdown linting rules.
Fixes: 1) Corrected `ForeignKey` type assertions across models; 2) Resolved typos and formatting inconsistencies in `.env` and README; 3) Fixed explicit boolean checks in user manager methods.

Extra: Updated type hints in multiple models, serializers, and views.
2025-06-18 15:58:49 +03:00
328ccaa615 Features: 1) 2.8.9 update
Fixes: 1) wtf go read diff;

Extra: ???
2025-06-18 15:05:58 +03:00
d86a6ed3c8 RUFF 2025-05-26 16:12:59 +03:00
5c98129a6f Features: 1) Switch Promotion creation to update_or_create to handle existing records;
Fixes: 1) Ensure Promotion update logic correctly applies changes to existing entries;

Extra: 1) Code formatting adjustments to improve readability;
2025-05-20 10:45:03 +03:00
ae17cc1371 Features: 1) Add populate_index function for Elasticsearch indexing and integrate it into update_products; 2) Enhance CategoryViewSet queryset with prefetching of "parent" and "children";
Fixes: 1) Refine logic in vendor category and brand handling to correctly handle multiple active/inactive entries;

Extra: 1) Add missing import for `registry` in Elasticsearch module; 2) Minor cleanup and spacing adjustments in Elasticsearch and vendor modules.
2025-05-12 20:22:01 +03:00
ed16a4fd3d Revert "Features:"
This reverts commit a31ce44dfc.
2025-05-09 04:31:48 +03:00
a31ce44dfc Features:
1) Add Celery shared_task decorator to `update_stock` method for asynchronous execution.

Fixes:
1) Replace direct `update_stock()` calls with `update_stock.delay()` to enable task queuing.

Extra:
1) Add missing import for `shared_task` in `core/vendors/__init__.py`.
2025-05-09 04:29:07 +03:00
0a9a6dfd6c Features:
1) Add error handling with logger and custom error message for holiday API requests;

Fixes:
(none);

Extra:
1) Replace direct API response raising with try-except block for better robustness and logging;
2025-05-09 04:17:47 +03:00
87e124f614 Handle errors in vendor stock updates and inactive vendors
Add error handling during the stock update process to log and skip problematic vendors without halting execution. Additionally, ensure `get_vendor_instance` only returns active vendors, raising an error if the vendor is inactive. This improves system resilience and data integrity.
2025-05-07 03:15:23 +03:00
12ccd04943 Update API version to 2.6.0 and reformat migration files
Updated the API version from 2.5.0 to 2.6.0 in the DRF settings for consistency across configurations. Reformatted migration files for better readability, ensuring consistency in code style and improving maintainability. These changes do not alter functionality but enhance clarity and documentation.
2025-05-06 19:19:49 +03:00
7d6eb8a27a Refine API key validation in task configuration.
Previously, an "example key" could mistakenly pass the check, leading to potential misuse. This update ensures features are disabled if the API key is invalid or set to default.
2025-05-06 17:57:35 +03:00
96c3fe23b0 Update promotion handling and logging levels
Change promotions to inactive instead of deleting them to maintain data integrity. Adjust Celery logging levels to be DEBUG/INFO based on the DEBUG setting, improving log granularity during development and clarity in production.
2025-05-05 17:16:57 +03:00
68febcdb08 Initial Commit 2025-04-29 22:40:30 +03:00