Skip to content

Commit 91c343c

Browse files
authored
Merge pull request #29 from comet-toolkit/small_fixes
fix bug when adding component with templater that already exists
2 parents 4f32df4 + e4b5077 commit 91c343c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

obsarray/unc_accessor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,8 @@ def _add_unc_var(
877877
self._obj[obs_var].attrs["unc_comps"]
878878
]
879879

880-
self._obj[obs_var].attrs["unc_comps"].append(unc_var)
880+
if unc_var not in self._obj[obs_var].attrs["unc_comps"]:
881+
self._obj[obs_var].attrs["unc_comps"].append(unc_var)
881882

882883
else:
883884
self._obj[obs_var].attrs["unc_comps"] = unc_var

0 commit comments

Comments
 (0)