Fix problem when method is run for a workflow that is non-existant locally

This commit is contained in:
Kelly McDonald 2020-12-04 12:00:02 -05:00
parent d41d018fe3
commit cad613cf63
1 changed files with 2 additions and 0 deletions

View File

@ -405,6 +405,8 @@ def get_workflow_spec_files_dataframe(workflowid):
'md5_hash':file.md5_hash,
'filename':file.file_model.name,
'date_created':file.date_created})
if len(filelist) == 0:
return pd.DataFrame(columns=['file_model_id','workflow_spec_id','md5_hash','filename','date_created'])
df = pd.DataFrame(filelist).sort_values('date_created').groupby('file_model_id').last()
df['date_created'] = df['date_created'].astype('str')
return df