fix: [analyst data] zero out sharing group ID when other distribution setting is selected

pull/9594/head
iglocska 2024-02-27 08:24:24 +01:00
parent 27885e19ca
commit 9f859892c2
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 11 additions and 0 deletions

View File

@ -148,6 +148,17 @@ class AnalystData extends AppModel
$this->data[$this->current_type]['authors'] = $this->current_user['email'];
}
}
if (isset($this->data[$this->current_type]['distribution'])) {
if (
$this->data[$this->current_type]['distribution'] != 4 &&
(
isset($this->data[$this->current_type]['sharing_group_id']) &&
$this->data[$this->current_type]['sharing_group_id'] != 0
)
) {
$this->data[$this->current_type]['sharing_group_id'] = 0;
}
}
return true;
}