FIX [duplicate][delete] fix error messages for treating the accompaning_period_work linked to the person that will be deleted

This commit is contained in:
Julie Lenaerts 2023-07-12 10:42:46 +02:00
parent 197d69ef4a
commit d825a8509b
2 changed files with 9 additions and 3 deletions

View File

@ -133,9 +133,15 @@ class PersonMove
$conditions = [];
if (array_key_exists('joinTable', $mapping)) {
foreach ($mapping['joinTable']['joinColumns'] as $columns) {
$conditions[] = sprintf('%s = %d', $columns['referencedColumnName'], $from->getId());
}
} elseif (array_key_exists('joinColumns', $mapping)) {
foreach ($mapping['joinColumns'] as $columns) {
$conditions[] = sprintf('%s = %d', $columns['name'], $from->getId());
}
}
return sprintf(
'DELETE FROM %s WHERE %s',

View File

@ -4,7 +4,7 @@
<li><b>{{ 'gender'|trans }}</b>:
{{ person.gender|trans }}</li>
<li><b>{{ 'maritalStatus'|trans }}</b>:
{% if person.maritalStatus.name %}{{ person.maritalStatus.name|localize_translatable_string }}{% endif %}</li>
{% if person.maritalStatus %}{{ person.maritalStatus.name|localize_translatable_string }}{% endif %}</li>
<li><b>{{ 'birthdate'|trans }}</b>:
{% if person.birthdate is not null %}{{ person.birthdate|format_date('short') }}{% endif %}</li>
<li><b>{{ 'placeOfBirth'|trans }}</b>: