diff --git a/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx b/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx index 9faefba6b9..5965deb390 100644 --- a/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx +++ b/source/frontend/src/features/leases/shared/propertyPicker/LeasePropertySelector.tsx @@ -15,7 +15,7 @@ import { useProperties } from '@/hooks/repositories/useProperties'; import useDeepCompareEffect from '@/hooks/util/useDeepCompareEffect'; import useDeepCompareMemo from '@/hooks/util/useDeepCompareMemo'; import { ApiGen_Concepts_PropertyView } from '@/models/api/generated/ApiGen_Concepts_PropertyView'; -import { isValidId } from '@/utils'; +import { exists, isValidId, isValidString } from '@/utils'; import { FormLeaseProperty, LeaseFormModel } from '../../models'; import SelectedPropertyHeaderRow from './selectedPropertyList/SelectedPropertyHeaderRow'; @@ -113,28 +113,25 @@ export const LeasePropertySelector: React.FunctionComponent 0) { - formProperty.property!.apiId = result[0].id; + formProperty.property.apiId = result[0].id; } } } newFormProperties.push(formProperty); - - if (isValidId(formProperty.property?.apiId)) { - needsWarning = needsWarning || true; - } else { - needsWarning = needsWarning || false; - } }); }, Promise.resolve());