diff --git a/src/cal_tools/calcat_interface2.py b/src/cal_tools/calcat_interface2.py index 4f0c9d30c7325eacea23bf94e3b88b32797d7a05..9af50846c3847364f3ac7b14b0cbc4c52751ae27 100644 --- a/src/cal_tools/calcat_interface2.py +++ b/src/cal_tools/calcat_interface2.py @@ -1,7 +1,7 @@ import json import re from collections.abc import Mapping -from dataclasses import dataclass +from dataclasses import dataclass, replace from datetime import date, datetime, time, timezone from functools import lru_cache from pathlib import Path @@ -357,7 +357,7 @@ class MultiModuleConstant(Mapping): ) d = {aggr: scv for (aggr, scv) in self.constants.items() if aggr in aggs} mods = [m for m in self.module_details if m["karabo_da"] in d] - return MultiModuleConstant(d, mods, self.detector_name) + return replace(self, constants=d, module_details=mods) # These properties label only the modules we have constants for, which may # be a subset of what's in module_details