File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 1818 try
1919 % source_id = add_source_if_missing(...)
2020 insert(sln_animal .Source ,key_s );
21- source_id(i ) = fetch1(sln_animal .Source , ' source_id' , ' LIMIT 1 DESC' );
21+ source_id(i ) = fetch1(sln_animal .Source , ' source_id' , ' ORDER BY source_id DESC LIMIT 1 ' );
2222 key.source_id = source_id(i );
2323 insert(feval(sprintf(' sln_animal.%s ' ,source_type )), key );
2424 C .commitTransaction ;
25- catch
25+ catch ME
2626 C .cancelTransaction ;
27+ rethrow(ME )
2728 end
2829 end
2930end
Original file line number Diff line number Diff line change 6363 curSourceID = old_animals(curInd ).source_id;
6464
6565 if ismember(curSourceID , all_breeding_cages )
66- b = sl .BreedingCage & sprintf(' cage_number="%s "' , curSourceID )
67- b .getMember(' Male' )
68- pause ;
66+ b = sl .BreedingCage & sprintf(' cage_number="%s "' , curSourceID );
6967 try
70-
71- key.male_id = fetch1(b .getMember(' Male' ), ' animal_id' )
72- key.female_id = fetch1(b .getMember(' Female' ), ' animal_id' )
68+ key.male_id = fetch1(b .getMember(' Male' ), ' animal_id' );
69+ key.female_id = fetch1(b .getMember(' Female' ), ' animal_id' );
7370 id = sln_animal .add_source(key ,' BreedingPair' );
7471 active_breeding_cage_ind = [active_breeding_cage_ind , curInd ];
7572 new_animals(curInd ).source_id = id ;
You can’t perform that action at this time.
0 commit comments