Problem creating a new event that contains a single image
Problem when creating a new event that contains only an image. How to reproduce:
- Open the logbook
- Click on New
- Upload an image
- Click on save
The trace on the server is:
2020-09-18T13:17:24.338Z [debug]: updateEvent
{
category: 'comment',
content: [
{ format: 'plainText', text: '\n' },
{
format: 'html',
text: '<p><img style="width: auto;" src="http://localhost:8000/resource/cefc2925-29e6-4ab6-a4b3-68edc465c345/file/id/5f64b305212c6a35a72d9668/investigation/id/135816585/download" alt="" width="1163" height="891" /></p>'
}
],
creationDate: 'Fri Sep 18 2020 15:17:23 GMT+0200 (Central European Summer Time)',
investigationId: 135816585,
title: null,
tag: [],
type: 'annotation'
}
2020-09-18T13:17:24.340Z [debug]: _id can not be empty
_id : undefined
event : {"event":{"category":"comment","content":[{"format":"plainText","text":"\n"},{"format":"html","text":"<p><img style=\"width: auto;\" src=\"http://localhost:8000/resource/cefc2925-29e6-4ab6-a4b3-68edc465c345/file/id/5f64b305212c6a35a72d9668/investigation/id/135816585/download\" alt=\"\" width=\"1163\" height=\"891\" /></p>"}],"creationDate":"Fri Sep 18 2020 15:17:23 GMT+0200 (Central European Summer Time)","investigationId":135816585,"title":null,"tag":[],"type":"annotation"}}
This issue affects the current deployed version <=2.2.3