Avoid popup dialog at startup: Would you like to update all links to get the most recent data?

Hi, I have a writer document 1.fodt that contains a link to a section in another document. Each time I open 1.fodt from command line (Ubuntu Linux 22.04) a popup dialog appears with the message "The document 1.fodt contains one or more links to external data. Would you like to change the document, and update all links to get the most recent data? ". How can I automatically select “Yes” to this question and avoid having to answer this dialog each time?

I tried to go to menu “Tools->Options->LibreOffice Writer->General” and selected “Updated links when loading = Always” but it did not help.

This works, but if I want to export to pdf a document in headless mode it still doesn’t update links automatically.

Yes correct, I have submitted a patch here: https://gerrit.libreoffice.org/c/core/+/161628

To make it work I used: unoconv -v --unsafe-quiet-update book.odm
It is a deprecated solution but it works.

I found a solution: Go to menu “Tools->Options->LibreOfficeDev->Security->Macro Security…Trusted Sources” and add the directory of the section document to “Trusted File Locations”. Then go to menu "Tools->Options->LibreOffice Writer->General” and select “Update links when loading = Always”