fix create person on the fly

This commit is contained in:
2022-03-25 17:22:10 +01:00
parent 3babbe5e84
commit 1812592d43
2 changed files with 7 additions and 3 deletions

View File

@@ -235,8 +235,12 @@ export default {
type = this.$refs.castNew.radioType;
data = this.$refs.castNew.castDataByType();
// console.log('type', type);
data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null;
data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null;
if (typeof data.civility !== 'undefined' && null !== data.civility) {
data.civility = data.civility !== null ? {type: 'chill_main_civility', id: data.civility.id} : null;
}
if (typeof data.civility !== 'undefined' && null !== data.profession) {
data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null;
}
// console.log('onthefly data', data);
}
} else {