Bug 21610: Remove specific changes we made previously
We handled integers and dates for Koha::Patron and Koha::ItemType, we want now Koha::Object to deal with. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
9330deee55
commit
bc30f84e58
|
|
@ -37,18 +37,6 @@ Koha::ItemType - Koha Item type Object class
|
|||
|
||||
=cut
|
||||
|
||||
sub store {
|
||||
my ($self) = @_;
|
||||
|
||||
$self->rentalcharge(undef) if $self->rentalcharge eq '';
|
||||
$self->defaultreplacecost(undef) if $self->defaultreplacecost eq '';
|
||||
$self->processfee(undef) if $self->processfee eq '';
|
||||
$self->notforloan(0) unless $self->notforloan;
|
||||
$self->hideinopac(0) unless $self->hideinopac;
|
||||
|
||||
return $self->SUPER::store;
|
||||
}
|
||||
|
||||
=head3 image_location
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -192,29 +192,6 @@ sub store {
|
|||
|
||||
$self->trim_whitespaces;
|
||||
|
||||
# We don't want invalid dates in the db (mysql has a bad habit of inserting 0000-00-00)
|
||||
$self->dateofbirth(undef) unless $self->dateofbirth;
|
||||
$self->debarred(undef) unless $self->debarred;
|
||||
$self->date_renewed(undef) unless $self->date_renewed;
|
||||
$self->lastseen(undef) unless $self->lastseen;
|
||||
|
||||
if ( defined $self->updated_on and not $self->updated_on ) {
|
||||
$self->updated_on(undef);
|
||||
}
|
||||
|
||||
# Set default values if not set
|
||||
$self->sms_provider_id(undef) unless $self->sms_provider_id;
|
||||
$self->guarantorid(undef) unless $self->guarantorid;
|
||||
|
||||
# If flags == 0 or flags == '' => no permission
|
||||
$self->flags(undef) unless $self->flags;
|
||||
|
||||
# tinyint or int
|
||||
$self->gonenoaddress(0) unless $self->gonenoaddress;
|
||||
$self->login_attempts(0) unless $self->login_attempts;
|
||||
$self->privacy_guarantor_checkouts(0) unless $self->privacy_guarantor_checkouts;
|
||||
$self->lost(0) unless $self->lost;
|
||||
|
||||
unless ( $self->in_storage ) { #AddMember
|
||||
|
||||
# Generate a valid userid/login if needed
|
||||
|
|
@ -240,9 +217,6 @@ sub store {
|
|||
: undef;
|
||||
$self->privacy($default_privacy);
|
||||
|
||||
unless ( defined $self->privacy_guarantor_checkouts ) {
|
||||
$self->privacy_guarantor_checkouts(0);
|
||||
}
|
||||
|
||||
# Make a copy of the plain text password for later use
|
||||
$self->plain_text_password( $self->password );
|
||||
|
|
@ -263,11 +237,6 @@ sub store {
|
|||
}
|
||||
else { #ModMember
|
||||
|
||||
# Come from ModMember, but should not be possible (?)
|
||||
$self->dateenrolled(undef) unless $self->dateenrolled;
|
||||
$self->dateexpiry(undef) unless $self->dateexpiry;
|
||||
|
||||
|
||||
my $self_from_storage = $self->get_from_storage;
|
||||
# FIXME We should not deal with that here, callers have to do this job
|
||||
# Moved from ModMember to prevent regressions
|
||||
|
|
|
|||
Loading…
Reference in New Issue