Bugzilla – Attachment 81017 Details for
Bug 21610
Koha::Object->store needs to handle incorrect values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21610: Remove specific changes we made previously
Bug-21610-Remove-specific-changes-we-made-previous.patch (text/plain), 3.45 KB, created by
Kyle M Hall (khall)
on 2018-10-23 13:16:13 UTC
(
hide
)
Description:
Bug 21610: Remove specific changes we made previously
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2018-10-23 13:16:13 UTC
Size:
3.45 KB
patch
obsolete
>From 62fe52718ca910f3307900b2a14a28f6b654657e Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 18 Oct 2018 18:46:30 -0300 >Subject: [PATCH] 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> >--- > Koha/ItemType.pm | 12 ------------ > Koha/Patron.pm | 28 ---------------------------- > 2 files changed, 40 deletions(-) > >diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm >index d2a23b5bdd..3d769a5f91 100644 >--- a/Koha/ItemType.pm >+++ b/Koha/ItemType.pm >@@ -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 >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 74157731e1..331d6c03a6 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -192,26 +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; >- $self->updated_on(undef) unless $self->updated_on; >- >- # 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 >@@ -237,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 ); >@@ -260,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 >-- >2.17.1 (Apple Git-112)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21610
:
80880
|
80881
|
80882
|
80906
|
80926
|
80927
|
81016
|
81017
|
81018
|
81019
|
81020
|
81021
|
84601
|
84602
|
84603
|
84604
|
84605
|
84606
|
84642
|
84643
|
84644
|
84645
|
84646
|
84647