File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -85,9 +85,11 @@ def to_dict(self, json=False):
85
85
"outcome" : self .estimator .outcome ,
86
86
"adjustment_set" : list (self .adjustment_set ) if json else self .adjustment_set ,
87
87
"effect_measure" : self .test_value .type ,
88
- "effect_estimate" : self .test_value .value ,
89
- "ci_low" : self .ci_low (),
90
- "ci_high" : self .ci_high (),
88
+ "effect_estimate" : self .test_value .value .to_dict ()
89
+ if json and hasattr (self .test_value .value , "to_dict" )
90
+ else self .test_value .value ,
91
+ "ci_low" : self .ci_low ().to_dict () if json and hasattr (self .ci_low (), "to_dict" ) else self .ci_low (),
92
+ "ci_high" : self .ci_high ().to_dict () if json and hasattr (self .ci_high (), "to_dict" ) else self .ci_high (),
91
93
}
92
94
if self .adequacy :
93
95
base_dict ["adequacy" ] = self .adequacy .to_dict ()
You can’t perform that action at this time.
0 commit comments