diff --git a/app/modules/analytics/definition.py b/app/modules/analytics/definition.py index 4eb715f6..823a2f72 100644 --- a/app/modules/analytics/definition.py +++ b/app/modules/analytics/definition.py @@ -101,6 +101,7 @@ analytics_module = ModuleDefinition( ), ], }, + requires=["catalog", "inventory", "marketplace", "orders"], # Imports from these modules is_core=False, # ========================================================================= # Self-Contained Module Configuration diff --git a/app/modules/billing/services/admin_subscription_service.py b/app/modules/billing/services/admin_subscription_service.py index 2eb94564..254dc8d0 100644 --- a/app/modules/billing/services/admin_subscription_service.py +++ b/app/modules/billing/services/admin_subscription_service.py @@ -27,6 +27,7 @@ from app.modules.billing.models import ( SubscriptionStatus, SubscriptionTier, ) +from app.modules.tenancy.exceptions import PlatformNotFoundException logger = logging.getLogger(__name__) @@ -316,7 +317,7 @@ class AdminSubscriptionService: try: p = platform_service.get_platform_by_id(db, platform_id) return p.name - except Exception: + except PlatformNotFoundException: return None # ========================================================================= diff --git a/app/modules/core/services/auth_service.py b/app/modules/core/services/auth_service.py index abe3736f..f94a0e34 100644 --- a/app/modules/core/services/auth_service.py +++ b/app/modules/core/services/auth_service.py @@ -22,6 +22,7 @@ from sqlalchemy.orm import Session from app.modules.tenancy.exceptions import ( EmailNotVerifiedException, InvalidCredentialsException, + StoreNotFoundException, UserNotActiveException, ) from app.modules.tenancy.schemas.auth import UserLogin @@ -103,7 +104,7 @@ class AuthService: try: return store_service.get_active_store_by_code(db, store_code) - except Exception: + except StoreNotFoundException: return None def get_user_store_role( diff --git a/app/modules/customers/services/customer_service.py b/app/modules/customers/services/customer_service.py index ad0dcaaa..32e8158b 100644 --- a/app/modules/customers/services/customer_service.py +++ b/app/modules/customers/services/customer_service.py @@ -614,7 +614,7 @@ class CustomerService: store = store_service.get_store_by_id_optional(db, store_id) if store: store_code = store.store_code - except Exception: + except SQLAlchemyError: pass cust_number = self._generate_customer_number(db, store_id, store_code) diff --git a/app/modules/inventory/definition.py b/app/modules/inventory/definition.py index 7279d997..63baf409 100644 --- a/app/modules/inventory/definition.py +++ b/app/modules/inventory/definition.py @@ -56,7 +56,7 @@ inventory_module = ModuleDefinition( "transaction history, and bulk imports." ), version="1.0.0", - requires=["catalog"], # Depends on catalog module for Product model + requires=["catalog", "orders"], # Depends on catalog module for Product model and orders module # Module-driven permissions permissions=[ PermissionDefinition( diff --git a/app/modules/loyalty/templates/loyalty/admin/program-edit.html b/app/modules/loyalty/templates/loyalty/admin/program-edit.html index ec85096a..3c7ec9e8 100644 --- a/app/modules/loyalty/templates/loyalty/admin/program-edit.html +++ b/app/modules/loyalty/templates/loyalty/admin/program-edit.html @@ -3,6 +3,7 @@ {% from 'shared/macros/headers.html' import detail_page_header %} {% from 'shared/macros/alerts.html' import loading_state, error_state %} {% from 'shared/macros/modals.html' import confirm_modal %} +{% from 'shared/macros/inputs.html' import number_stepper %} {% block title %}Program Configuration{% endblock %} @@ -61,8 +62,7 @@
1 EUR = point(s)