schon/engine/core/utils/lists.py
Egor fureunoir Gorbunov 43ece8c25c Features: 1) Add language validation and fallback for users without proper language settings in initialize.py; 2) Enhance user update mutation with improved error handling and dynamic attribute support; 3) Integrate is_safe_key validation in user attribute updates for better security.
Fixes: 1) Add missing imports for `settings`, `Q`, and `is_safe_key`; 2) Correct user permissions keys in `lists.py` utility.

Extra: 1) Refactor `UpdateUser` mutation for cleaner structure and unified error handling; 2) Format and tidy up list declarations and exception handling for clarity.
2025-11-25 14:26:14 +03:00

22 lines
394 B
Python

FAILED_STATUSES = ["FAILED", "CANCELED", "RETURNED"]
PRODUCTS_ORDERING_FIELDS = ["name", "price", "quantity"]
TRANSACTION_SUCCESSFUL_STATUSES = [
"purchase_complete",
"successful",
]
TRANSACTION_FAILED_STATUSES = [
"failed",
"canceled",
]
BAD_KEYS_TO_LISTEN = [
"is_staff",
"is_superuser",
"is_active",
"is_verified",
"groups",
"user_permissions",
]