http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13602 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #11)
Comment on attachment 35651 [details] [review] [PASSED QA] Bug 13602 - Username/password already exists when editing borrower attributes and messaging preferences
Review of attachment 35651 [details] [review]: -----------------------------------------------------------------
::: members/memberentry.pl @@ +329,5 @@
} } + # Check if the userid is unique. Userid might not always be present in the edited values list when editing certain sub-forms, so we need to dig for it a bit. + my $userid = $newdata{'userid'}; + $userid = $borrower_data->{userid} unless $userid; #Get the userid straight from the DB
In my opinion,
my $userid = $newdata{userid} ? $newdata{userid} : $borrower_data->{userid};
or
my $userid = $newdata{userid}; $userid ||= $borrower_data->{userid};
Would have been more readable.
We could even use the defined-or operator: my $userid = $newdata->{ userid } // $borrower_data->{ userid }; -- You are receiving this mail because: You are watching all bug changes.