Skip to content
Open
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions app/eventyay/base/configurations/default_setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,7 @@ def primary_font_kwargs():
'The system generates by default {}-character long gift card codes. However, if a different length '
'is required, it can be set here.'.format(settings.ENTROPY['giftcard_secret'])
),
min_value=1,
),
},
'giftcard_expiry_years': {
Expand All @@ -2435,6 +2436,7 @@ def primary_font_kwargs():
'If you set a number here, gift cards will by default expire at the end of the year after this '
'many years. If you keep it empty, gift cards do not have an explicit expiry date.'
),
min_value=0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Clarify semantics of 0 vs empty value for gift card expiry configuration.

With min_value=0, a value of 0 is now valid in addition to leaving the field empty. Please make it explicit whether 0 is intended to mean “no expiry”, “expire immediately”, or something else. If only empty/None should mean “no expiry”, consider min_value=1 and handling empty as the special case; otherwise, ensure the downstream logic clearly distinguishes 0 from empty.

),
},
'privacy_policy': {
Expand Down