Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions kobo/apps/subsequences/actions/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from typing import Optional

import jsonschema
from constance import config
from django.conf import settings
from django.utils import timezone

Expand Down Expand Up @@ -193,7 +194,11 @@ def attach_action_dependency(self, action_data: dict):

def check_limits(self, user: User):

if not settings.STRIPE_ENABLED or not self._is_usage_limited:
if (
not settings.STRIPE_ENABLED
or not self._is_usage_limited
or not config.USAGE_LIMIT_ENFORCEMENT
):
return

calculator = ServiceUsageCalculator(user)
Expand Down Expand Up @@ -399,7 +404,6 @@ def revise_data(
`submission` argument for future use by subclasses
this method might need to be made more friendly for overriding
"""

self.validate_data(action_data)
self.raise_for_any_leading_underscore_key(action_data)

Expand Down
Loading