diff --git a/bw_timex/helper_classes.py b/bw_timex/helper_classes.py index 564b2f7..36cc8b6 100644 --- a/bw_timex/helper_classes.py +++ b/bw_timex/helper_classes.py @@ -129,6 +129,10 @@ def add(self, process_time_tuple, unique_id=None): return self[process_time_tuple] if unique_id is not None: + if unique_id in self.values(): + raise ValueError( + f"Unique ID {unique_id} is already assigned to another process_time_tuple." + ) self[process_time_tuple] = unique_id return unique_id