Skip to content

Commit f40fc20

Browse files
authored
fix dictionary referencing
Had an issue with the Constraints object not having a 'Phase' key. The only key in Constraints is 'data' and the corresponding value is a dictionary with the 'Phase' key. Fixed by specifying 'data' key.
1 parent 72c3c8a commit f40fc20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

GSASII/GSASIIscriptable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ def add_phase(self, phasefile=None, phasename=None, histograms=[],
13911391

13921392
# process constraints, currently generated only from ISODISTORT CIFs
13931393
if phasereader.Constraints:
1394-
Constraints = self.data['Constraints']
1394+
Constraints = self.data['Constraints']['data']
13951395
for i in phasereader.Constraints:
13961396
if isinstance(i, dict):
13971397
if '_Explain' not in Constraints:

0 commit comments

Comments
 (0)