From 563ec032d92bd23236c3eceb4d3592ae951ba5fc Mon Sep 17 00:00:00 2001 From: Markus Scheidgen <markus.scheidgen@gmail.com> Date: Mon, 18 May 2020 21:26:31 +0200 Subject: [PATCH] Minor fixes and linting. --- gui/src/components/App.js | 1 - nomad/datamodel/dft.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gui/src/components/App.js b/gui/src/components/App.js index 21dde12316..56be3960e8 100644 --- a/gui/src/components/App.js +++ b/gui/src/components/App.js @@ -37,7 +37,6 @@ import {help as userdataHelp, default as UserdataPage} from './UserdataPage' import ResolveDOI from './dataset/ResolveDOI' import FAQ from './FAQ' import EntryQuery from './entry/EntryQuery' -import KeepState from './KeepState' export const ScrollContext = React.createContext({scrollParentRef: null}) diff --git a/nomad/datamodel/dft.py b/nomad/datamodel/dft.py index 5ab78150e5..f45cc23dbf 100644 --- a/nomad/datamodel/dft.py +++ b/nomad/datamodel/dft.py @@ -273,6 +273,10 @@ class DFTMetadata(MSection): return config.services.unavailable_value def update_group_hash(self): + user_id = None + uploader = self.m_parent.uploader + if uploader is not None: + user_id = uploader.user_id self.group_hash = utils.hash( self.m_parent.formula, self.spacegroup, @@ -281,7 +285,7 @@ class DFTMetadata(MSection): self.code_name, self.code_version, self.m_parent.with_embargo, - self.m_parent.uploader.user_id) + user_id) def apply_domain_metadata(self, backend): from nomad.normalizing.system import normalized_atom_labels -- GitLab