diff --git a/src/api/planters.js b/src/api/planters.js index 34bbe47e5..9ab22eb41 100644 --- a/src/api/planters.js +++ b/src/api/planters.js @@ -102,6 +102,9 @@ export default { }, updatePlanter(planterUpdate) { + if (planterUpdate.organizationId === 'null') { + planterUpdate = { ...planterUpdate, organizationId: null }; + } const { id } = planterUpdate; const planterQuery = `${ process.env.REACT_APP_API_ROOT diff --git a/src/components/EditPlanter.js b/src/components/EditPlanter.js index 828ed1ad4..5ba37601f 100644 --- a/src/components/EditPlanter.js +++ b/src/components/EditPlanter.js @@ -175,6 +175,9 @@ const EditPlanter = (props) => { handleChange('organizationId', e.target.value); }} > + + No organization + {[...props.organizationState.organizationList].map((org) => ( {org.name}