Handle existing link error for person update

This commit is contained in:
Neeraj Gupta
2025-05-15 13:51:13 +05:30
parent 45fe850afc
commit 1b4cb2ed99

View File

@@ -682,7 +682,8 @@ class _SaveOrEditPersonState extends State<SaveOrEditPerson> {
_email!.isNotEmpty &&
_email != person!.data.email &&
await checkIfEmailAlreadyAssignedToAPerson(_email!)) {
throw Exception("Email already assigned to a person");
await showAlreadyLinkedEmailDialog(context, _email!);
return null;
}
final String name = _inputName.trim();
final String? birthDate = _selectedDate;