Skip to content

Commit 0328093

Browse files
committed
add assertion
1 parent 9ca692d commit 0328093

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

autofit/aggregator/summary/aggregate_csv.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ def __init__(self, aggregator: Aggregator):
190190
----------
191191
aggregator
192192
"""
193+
if len(aggregator) == 0:
194+
raise ValueError("The aggregator is empty.")
195+
193196
self._aggregator = aggregator
194197
self._columns = []
195198

autofit/aggregator/summary/aggregate_fits.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ def __init__(self, aggregator: Aggregator):
4343
aggregator
4444
The aggregator containing the fits files.
4545
"""
46+
if len(aggregator) == 0:
47+
raise ValueError("The aggregator is empty.")
48+
4649
self.aggregator = aggregator
4750

4851
@staticmethod

0 commit comments

Comments
 (0)