Browse Source

Bug 9078 - fixing exceptions broke tests

Fixing the holiday exceptions arised a problem with how the test data was constructed.
This made several tests fail.

This patch fixes the add_holiday function. Tests should pass now.

Sponsored-by: Universidad Nacional de Córdoba
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
3.12.x
Tomás Cohen Arazi 12 years ago
committed by Jared Camins-Esakov
parent
commit
afc860d66b
  1. 4
      Koha/Calendar.pm

4
Koha/Calendar.pm

@ -329,9 +329,9 @@ sub clear_weekly_closed_days {
sub add_holiday {
my $self = shift;
my $new_dt = shift;
my @dt = $self->{exception_holidays}->as_list;
my @dt = $self->{single_holidays}->as_list;
push @dt, $new_dt;
$self->{exception_holidays} =
$self->{single_holidays} =
DateTime::Set->from_datetimes( dates => \@dt );
return;

Loading…
Cancel
Save