ComPlat / chemotion_ELN

Electronic Lab Notebook
https://www.chemotion.net
GNU Affero General Public License v3.0
119 stars 45 forks source link

Saving reaction fails with development seeded reactions #1943

Closed JanCBrammer closed 2 weeks ago

JanCBrammer commented 1 month ago

Saving a reaction fails with

TypeError: Cannot read properties of null (reading 'attachments')
    at Function.getAttachments (BaseFetcher.js:127:1)
    at Function.updateAnnotationsInContainer (BaseFetcher.js:137:1)
    at Function.updateAnnotationsInReaction (ReactionsFetcher.js:97:1)
    at ReactionsFetcher.js:81:1
ElementActions.js:620 TypeError: Cannot read properties of undefined (reading 'type')
    at Store.handleUpdateElement (ElementStore.js:1327:1)
    at Store.handleUpdateLinkedElement (ElementStore.js:718:1)
    at AltStore.js:88:1
    at Array.every (<anonymous>)
    at AltStore.js:87:1
    at handleDispatch (AltStore.js:54:1)
    at Object.ID_4 (AltStore.js:86:1)
    at Dispatcher._invokeCallback (Dispatcher.js:198:1)
    at Dispatcher.dispatch (Dispatcher.js:174:1)
    at index.js:83:1

Potentially related to 5c3d32df60a87e012e18dd5552d5cacaabc4b679?

Error occurs when saving a reaction via the UI (reaction detail modal) with the save button image

FabianMauz commented 1 month ago

After investigating we found that the issue only appears on seeded data. In contrast to samples, reactions do not have a root container after seeding.