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.
22 lines
394 B
Python
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",
|
|
]
|