http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13602
Tomás Cohen Arazi <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #13 from Tomás Cohen Arazi <[email protected]> --- (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. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
