Skip to content

Commit

Permalink
raise exception for empty view tables
Browse files Browse the repository at this point in the history
  • Loading branch information
SageGJ committed Dec 2, 2024
1 parent 0a00086 commit 0cca133
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions schematic/store/synapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,11 @@ def getFilesInStorageDataset(
"""
file_list = []

if self.storageFileviewTable.empty:
raise ValueError(
f"Fileview {self.storageFileview} is empty, please check the table and the provided synID and try again."
)

# Get path to dataset folder by using children to avoid cases where the dataset is the scope of the view
child_path = self.storageFileviewTable.loc[
self.storageFileviewTable["parentId"] == datasetId, "path"
Expand Down

0 comments on commit 0cca133

Please sign in to comment.