AddPerson: add civility when creating a person

This commit is contained in:
nobohan
2022-04-14 18:04:36 +02:00
parent c1ec2933e5
commit 7a2151f23a
5 changed files with 41 additions and 6 deletions

View File

@@ -210,7 +210,6 @@ export default {
let
type = this.type,
data = {} ;
switch (type) {
case 'person':
data = this.$refs.castPerson.$data.person;
@@ -238,7 +237,7 @@ export default {
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) {
if (typeof data.profession !== 'undefined' && null !== data.profession) {
data.profession = data.profession !== null ? {type: 'third_party_profession', id: data.profession.id} : null;
}
// console.log('onthefly data', data);