Skip to content

Commit

Permalink
prevent editFileMetadata from putting errors in log #8305
Browse files Browse the repository at this point in the history
editFileAction only appears in these two files:

- file-edit-button-fragment.xhtml
- filesFragment.xhtml

So it should be safe to hard code the method, which is always
DatasetPage.editFileMetadata().
  • Loading branch information
pdurbin committed Aug 9, 2023
1 parent 0133009 commit b7ec905
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/main/webapp/file-edit-button-fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
configureTools - for single file, list of configureTools for the file
bean - the named value of the backing bean for the below method(s), also used by isFilePg param
unrestrictFileAction - name of the method on the above bean to call for unrestrict (method must take a boolean)
editFileAction - for selected files, name of method on the above bean to send for edit metadata
refreshTagsPopoupAction - for selected files, name of method on the above bean to refresh tags popup
-->
</ui:remove>
Expand All @@ -38,7 +37,7 @@
<p:commandLink onclick="if (!(#{fileMetadata!=null} || testFilesSelected()))
return false;"
oncomplete="if(#{fileMetadata!=null}) window.location.assign('/editdatafiles.xhtml?selectedFileIds=#{fileMetadata.dataFile.id}&#38;datasetId=#{fileMetadata.datasetVersion.dataset.id}#{isFilePg?'&#38;referrer=FILE':''}&#38;version=#{fileMetadata.datasetVersion.version}')"
action="#{bean[editFileAction]()}">
action="#{DatasetPage.editFileMetadata()}">
<h:outputText value="#{bundle['file.metadata']}"/>
</p:commandLink>
</li>
Expand Down
1 change: 0 additions & 1 deletion src/main/webapp/filesFragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@
<ui:param name="fileMetadataForAction" value="#{DatasetPage.fileMetadataForAction}"/>
<ui:param name="bean" value="#{DatasetPage}"/>
<ui:param name="unrestrictFileAction" value="restrictFiles"/>
<ui:param name="editFileAction" value="editFileMetadata"/>
<ui:param name="refreshTagsPopoupAction" value="refreshTagsPopUp"/>
</ui:include>
</ul>
Expand Down

0 comments on commit b7ec905

Please sign in to comment.