Commit 4bd20b17 authored by Frédéric Buclin's avatar Frédéric Buclin

Fix bustage due to bug 801664

parent 725f2fb7
...@@ -1990,11 +1990,11 @@ sub _check_field_is_mandatory { ...@@ -1990,11 +1990,11 @@ sub _check_field_is_mandatory {
sub _check_date_field { sub _check_date_field {
my ($invocant, $date) = @_; my ($invocant, $date) = @_;
return _check_datetime_field($invocant, $date, 1); return $invocant->_check_datetime_field($date, undef, {date_only => 1});
} }
sub _check_datetime_field { sub _check_datetime_field {
my ($invocant, $date_time, $date_only) = @_; my ($invocant, $date_time, $field, $params) = @_;
# Empty datetimes are empty strings or strings only containing # Empty datetimes are empty strings or strings only containing
# 0's, whitespace, and punctuation. # 0's, whitespace, and punctuation.
...@@ -2008,7 +2008,7 @@ sub _check_datetime_field { ...@@ -2008,7 +2008,7 @@ sub _check_datetime_field {
ThrowUserError('illegal_date', { date => $date, ThrowUserError('illegal_date', { date => $date,
format => 'YYYY-MM-DD' }); format => 'YYYY-MM-DD' });
} }
if ($time && $date_only) { if ($time && $params->{date_only}) {
ThrowUserError('illegal_date', { date => $date_time, ThrowUserError('illegal_date', { date => $date_time,
format => 'YYYY-MM-DD' }); format => 'YYYY-MM-DD' });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment