forked from CGM_Public/pretix_original
Fix handling negative values in rrule (e.g. batch-adding subevents) (#5476)
This commit is contained in:
committed by
GitHub
parent
3b30553880
commit
b8b89f3040
@@ -67,7 +67,8 @@ class RRuleForm(forms.Form):
|
||||
)
|
||||
count = forms.IntegerField(
|
||||
label=_('Number of repetitions'),
|
||||
initial=10
|
||||
initial=10,
|
||||
min_value=1,
|
||||
)
|
||||
until = forms.DateField(
|
||||
widget=forms.DateInput(
|
||||
|
||||
4
src/pretix/static/rrule/rrule.js
vendored
4
src/pretix/static/rrule/rrule.js
vendored
@@ -1934,7 +1934,7 @@ function buildPoslist(bysetpos, timeset, start, end, ii, dayset) {
|
||||
function iter(iterResult, options) {
|
||||
var dtstart = options.dtstart, freq = options.freq, interval = options.interval, until = options.until, bysetpos = options.bysetpos;
|
||||
var count = options.count;
|
||||
if (count === 0 || interval === 0) {
|
||||
if (count <= 0 || interval <= 0) {
|
||||
return emitResult(iterResult);
|
||||
}
|
||||
var counterDate = datetime_DateTime.fromDate(dtstart);
|
||||
@@ -3799,4 +3799,4 @@ var isFullyConvertible = totext.isFullyConvertible;
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user