Fixed spool clone showing white screen

Resolves #326
This commit is contained in:
Donkie
2024-04-14 10:36:51 +02:00
parent 29f54358d6
commit 640ca8c430

View File

@@ -46,7 +46,9 @@ export const SpoolCreate: React.FC<IResourceComponentsProps & CreateOrCloneProps
formProps.initialValues.used_weight = 0; formProps.initialValues.used_weight = 0;
// Fix the filament_id // Fix the filament_id
formProps.initialValues.filament_id = formProps.initialValues.filament.id; if (formProps.initialValues.filament) {
formProps.initialValues.filament_id = formProps.initialValues.filament.id;
}
} }
// If the query variable filament_id is set, set the filament_id field to that value // If the query variable filament_id is set, set the filament_id field to that value