Skip to content

Commit

Permalink
Fix previous fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
bredelings committed Oct 3, 2023
1 parent 29f2937 commit 0bd5163
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ws/tolwsbooting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ string taxon_addition_method_handler( const json& parsedargs )
// But this just handles one addition.

auto [locked_taxonomy,lock] = tts.get_writable_taxonomy();
auto taxa = extract_required_argument<string>(parsedargs, "taxa");
if (not parsedargs.count("taxa"))
throw OTCBadRequest()<< "expected a field called 'taxa'";
auto taxa = parsedargs["taxa"];
int num_new_ottids = extract_required_argument<int>(parsedargs, "new_ottids_required");
if (taxa.size() > num_new_ottids)
throw OTCBadRequest() << "Amendment mentions "<<taxa.size()<<" taxa, but "<<num_new_ottids<<" new OTT IDs.";
Expand Down

0 comments on commit 0bd5163

Please sign in to comment.