Skip to content

Commit 343a3cf

Browse files
authored
Merge pull request #39 from torchbox-forks/support/allow-correct-settings-overrde
Allow the limit setting to work as expected
2 parents 5c5cbf9 + 75cee46 commit 343a3cf

File tree

3 files changed

+434
-18
lines changed

3 files changed

+434
-18
lines changed

wagtail_jotform/settings.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from django.conf import settings
22

3-
DEFAULTS = {}
3+
DEFAULTS = {"LIMIT": 50} # Default limit for JotForm API requests
44

55

66
class WagtailJotFormSettings:
@@ -11,7 +11,8 @@ def __getattr__(self, attr):
1111
# Check if present in user settings
1212
return django_settings[attr]
1313
except (KeyError, AttributeError):
14-
return getattr(DEFAULTS, attr, None)
14+
# Use the DEFAULTS dictionary directly
15+
return DEFAULTS.get(attr)
1516

1617

1718
wagtail_jotform_settings = WagtailJotFormSettings()

0 commit comments

Comments
 (0)