server icon indicating copy to clipboard operation
server copied to clipboard

fix: do not extract fields for blank template

Open elzody opened this issue 7 months ago • 0 comments

  • Part of: https://github.com/nextcloud/richdocuments/issues/4811

Summary

There is a request to the /ocs/v2.php/apps/files/api/v1/templates/fields/{fileid} endpoint where the file ID is undefined. This was due to the template field extraction request being submitted on the blank template and invalid template selections as well. In this case, we skip the request and use an empty array of fields.

In the end, it saves a few miliseconds of time in these cases.

Checklist

elzody avatar Jun 13 '25 20:06 elzody