diff --git a/CHANGES.rst b/CHANGES.rst index 18979cfa..7c1c22f4 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,18 @@ +2.4.1 (unreleased) +------------------ + +New Features +^^^^^^^^^^^^ + +Other Changes and Additions +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Bug Fixes +^^^^^^^^^ + +- Fixes a crash when attempting to filter an already-empty ImageFileCollection, + instead simply returning an empty ImageFileCollection. [#80x] + 2.4.0 (2022-11-16) ------------------ diff --git a/ccdproc/image_collection.py b/ccdproc/image_collection.py index 344bd3ae..a94f6e2c 100644 --- a/ccdproc/image_collection.py +++ b/ccdproc/image_collection.py @@ -366,6 +366,10 @@ def files_filtered(self, **kwd): Value comparison is case *insensitive* for strings, whether matching exactly or matching with regular expressions. """ + # If the collection is empty, self.summary == None; return empty list + if self.summary is None: + return [] + # force a copy by explicitly converting to a list current_file_mask = self.summary['file'].mask.tolist()