Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Nov 27, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 0ba5338 commit f1ebf50
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/Alchemy/Phrasea/Command/Record/RescanFilesMetadata.php
Original file line number Diff line number Diff line change
@@ -164,10 +164,8 @@ protected function doExecute(InputInterface $input, OutputInterface $output)
$action = "set";

if ($field->is_multi()) {
$action = 'add';

if ($multi == 'replace') {
$action = 'replace';
if ($multi != 'replace') {
$action = 'add';
}
}

@@ -205,9 +203,9 @@ protected function doExecute(InputInterface $input, OutputInterface $output)
if ($results != NULL) {
$metadatas = [];

if ($action == 'replace') {
// available action when field is multi-value
if ($field->is_multi()) {
$metadatas[] = [
'action' => $action,
'meta_struct_id' => $metaStructId,
'meta_id' => null,
'value' => $this->sanitizeValue($results, $fieldType)

0 comments on commit f1ebf50

Please sign in to comment.