https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38927
Bug ID: 38927 Summary: Unecessary call to FindDuplicate if x-confirm-not-duplicate is passed to POST /biblios Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.dru...@gmail.com QA Contact: testo...@bugs.koha-community.org CC: tomasco...@gmail.com Depends on: 31800 695 my ( $duplicatebiblionumber, $duplicatetitle ); 696 ( $duplicatebiblionumber, $duplicatetitle ) = FindDuplicate($record); 697 698 my $confirm_not_duplicate = $headers->header('x-confirm-not-duplicate'); 699 700 return $c->render( 701 status => 400, 702 openapi => { 703 error => "Duplicate biblio $duplicatebiblionumber", 704 } 705 ) unless !$duplicatebiblionumber || $confirm_not_duplicate; We don't need to call FindDuplicate if the header is set. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31800 [Bug 31800] Add POST endpoint for Biblios -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://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/