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,8 +46,10 @@ 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
if (formProps.initialValues.filament) {
formProps.initialValues.filament_id = formProps.initialValues.filament.id; 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
const query = new URLSearchParams(window.location.search); const query = new URLSearchParams(window.location.search);