Commit e3d1e9cb authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed bad POTCAR filter in RawFiles GUI view.

parent 566613e5
Pipeline #81983 passed with stages
in 32 minutes and 59 seconds
......@@ -2,6 +2,7 @@ window.nomadEnv = {
'keycloakBase': 'https://nomad-lab.eu/fairdi/keycloak/auth/',
'keycloakRealm': 'fairdi_nomad_test',
'keycloakClientId': 'nomad_gui_dev',
//'appBase': 'http://nomad-lab.eu/prod/rae/beta',
'appBase': 'http://localhost:8000/fairdi/nomad/latest',
'debug': false,
'matomoEnabled': false,
......
......@@ -107,6 +107,7 @@ class RawFiles extends React.Component {
if (files.length > 500) {
raiseError('There are more than 500 files in this entry. We can only show the first 500.')
}
console.log('###', files)
this.setState({files: files, loading: false})
}).catch(error => {
this.setState({files: null, loading: false})
......@@ -182,7 +183,7 @@ class RawFiles extends React.Component {
}
filterPotcar(file) {
if (file.includes('POTCAR') && !file.endsWith('.stripped')) {
if (file.substring(file.lastIndexOf('/')).includes('POTCAR') && !file.endsWith('.stripped')) {
return this.props.user && this.props.data.uploader.user_id === this.props.user.sub
} else {
return true
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment