From e1be94abffd4a519c1ec2ba193ac903c5f854e0c Mon Sep 17 00:00:00 2001 From: Adrian Powell Date: Sun, 20 Oct 2024 23:01:23 -0400 Subject: [PATCH 1/2] enable creation of empty seedlots --- lib/SGN/Controller/AJAX/Seedlot.pm | 5 ----- mason/breeders_toolbox/add_seedlot_dialogs.mas | 5 ++--- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/SGN/Controller/AJAX/Seedlot.pm b/lib/SGN/Controller/AJAX/Seedlot.pm index b0c7e1cba4..ee01d7d15e 100644 --- a/lib/SGN/Controller/AJAX/Seedlot.pm +++ b/lib/SGN/Controller/AJAX/Seedlot.pm @@ -467,11 +467,6 @@ sub create_seedlot :Path('/ajax/breeders/seedlot-create/') :Args(0) { my $transaction_description = $c->req->param("seedlot_transaction_description"); my $breeding_program_id = $c->req->param("seedlot_breeding_program_id"); - if (!$weight && !$amount){ - $c->stash->{rest} = {error=>'A seedlot must have either a weight or an amount.'}; - $c->detach(); - } - if (!$timestamp){ $c->stash->{rest} = {error=>'A seedlot must have a timestamp for the transaction.'}; $c->detach(); diff --git a/mason/breeders_toolbox/add_seedlot_dialogs.mas b/mason/breeders_toolbox/add_seedlot_dialogs.mas index 28cc2fa5ea..cfadb7f023 100644 --- a/mason/breeders_toolbox/add_seedlot_dialogs.mas +++ b/mason/breeders_toolbox/add_seedlot_dialogs.mas @@ -121,13 +121,13 @@ $cross_uniquename => ''
- +
- +