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.
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.
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`.
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;
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.
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.
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.
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.