New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Label required" on import risks even when label filled #484
Comments
I'm experciencing the same thing. The only workaround I found is to fill all the fields of the CSV file even the non mandatory ones. The error mentionned in the issue disappears but unfortunately another error happens next
|
I found the issue. It seems that during the import, the code is trying to link the measures to the Operational Risk. But since the CSV does not contain any measures, the access to the measure key fails. In order to fix this, you can modify the It just checks if the measures key exists before trying to get the array length. Since its empty, the import works. I will try to do a PR later today public function create($data)
{
if (array_key_exists("measures",$data)){
if(count($data['measures'])>0)
$data['measures'] = $this->addAnrId($data['measures']);
}
return parent::create($data);
} This fix is incomplete since it is still needed to fill all the fields of the CSV even the non-mandatory ones. To be clear, to use the import feature you need to:
|
Initially was mentioned MONARC version 2.12.6 (as it was at the time of report), but based on the details we could see that it is 2.12.7. |
Thank you for the prompt response and reaction! |
Thank you for the report and your contribution. |
Describe the bug
Exported data cannot be imported again. Even simple files cannot be imported.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Data is imported successfully
Screenshots
n/a
Desktop (please complete the following information):
Additional context
Same occurs with xlsx import.
When really leaving label empty, you get an error before import.
The text was updated successfully, but these errors were encountered: