File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/features/contribute/morphology/_components Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -421,7 +421,7 @@ export function JSONMorphologySchemaForm({
421
421
fetchMtypes ( session . accessToken ) ,
422
422
] ) ;
423
423
424
- let fetchedBrainRegionName = null ; // Renamed to avoid shadowing
424
+ let fetchedBrainRegionName = null ;
425
425
if ( nodeId ) {
426
426
fetchedBrainRegionName = await fetchBrainRegion ( session . accessToken , nodeId ) ;
427
427
}
@@ -441,6 +441,10 @@ export function JSONMorphologySchemaForm({
441
441
}
442
442
if ( licensesData ) {
443
443
setAllLicenses ( licensesData ) ;
444
+ if ( ! state . license_id ) {
445
+ const defaultLicenseId = 'ad8686db-3cdd-4e3f-bcbd-812380a9eba7' ;
446
+ setState ( ( prev ) => ( { ...prev , license_id : defaultLicenseId } ) ) ;
447
+ }
444
448
}
445
449
if ( mtypesData ) {
446
450
setAllMtypes ( mtypesData ) ;
@@ -449,7 +453,7 @@ export function JSONMorphologySchemaForm({
449
453
} ;
450
454
451
455
fetchData ( ) ;
452
- } , [ nodeId ] ) ;
456
+ } , [ nodeId , state . license_id , setState ] ) ;
453
457
454
458
const markFieldTouched = ( field : string ) => {
455
459
setTouchedFields ( ( prev ) => new Set ( [ ...prev , field ] ) ) ;
You can’t perform that action at this time.
0 commit comments