Skip to content

Commit

Permalink
Allow empty strings as values in Image Collection.
Browse files Browse the repository at this point in the history
  • Loading branch information
DinoBektesevic committed Sep 9, 2024
1 parent 2869f17 commit 8936030
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/kbmod/image_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,14 +716,12 @@ def _validate(self):
warnings.simplefilter("ignore", category=FutureWarning)
test1 = None in self.data[col]
test1 = test1 if isinstance(test1, bool) else test1.any()
test2 = "" in self.data[col]
test2 = test2 if isinstance(test2, bool) else test2.any()
if test1 or test2:
return False, "missing required self.data values: {col}"
if test1:
return False, f"missing required self.data values: {col}"

for col in shared_cols:
if self.data.meta[col] is None or self.data.meta[col] == "":
return False, "missing required self.data values: {col}"
return False, f"missing required self.data values: {col}"

return True, ""

Expand Down

0 comments on commit 8936030

Please sign in to comment.