Check if relation before trying to input relation label (#7605)

Bug introduced by https://github.com/twentyhq/twenty/pull/7363
Input value was not set during edition for field that were not relations

Fixed
<img width="893" alt="Capture d’écran 2024-10-11 à 16 53 56"
src="https://github.com/user-attachments/assets/511077c6-5dff-49a1-b058-24a83d998dcf">
This commit is contained in:
Thomas Trompette
2024-10-11 17:11:11 +02:00
committed by GitHub
parent 0980d6d9c8
commit c91a8c6abf

View File

@ -58,7 +58,7 @@ export const SettingsDataModelFieldIconLabelForm = ({
const [iconEditedManually, setIconEditedManually] = useState(false);
useEffect(() => {
if (labelEditedManually) return;
if (labelEditedManually || !relationType) return;
const label = [
RelationDefinitionType.ManyToOne,
RelationDefinitionType.ManyToMany,