Fixed bug which prevents creating photon data with no atomic relax

This commit is contained in:
Sam Powell-Gill 2020-02-19 09:26:13 +00:00
parent bdde630536
commit dd74b2f43f

View file

@ -784,8 +784,9 @@ class IncidentPhoton(EqualityMixin):
sub_group = shell_group.create_group(key)
# Write atomic relaxation
if key in self.atomic_relaxation.subshells:
self.atomic_relaxation.to_hdf5(sub_group, key)
if self.atomic_relaxation is not None:
if key in self.atomic_relaxation.subshells:
self.atomic_relaxation.to_hdf5(sub_group, key)
else:
continue