Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions lib/sample_uploader/sample_uploaderImpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ def filter_samplesets(self, ctx, params):
})

report_client = KBaseReport(self.callback_url)
report_info = report_client.create_extended_report({
report_params = {
'objects_created': [
{
'ref': "/".join([str(info[6]), str(info[0]), str(info[4])])
Expand All @@ -762,7 +762,16 @@ def filter_samplesets(self, ctx, params):
'message': f"SampleSet object named \"{params['out_sample_set_name']}\" \
created with condition(s): {conditions_summary}",
'workspace_name': params['workspace_name']
})
}

if not len(sample_search_api_response['sample_ids']):
warning_msg = "Warning: It appears your filtered sample set contains no samples. \
Attempting to open or view this sample set will result in an error \
from the Sample Service."
report_params['warnings'] = [warning_msg]

report_info = report_client.create_extended_report(report_params)

output = {
'report_name': report_info['name'],
'report_ref': report_info['ref'],
Expand Down