Skip to content

Commit

Permalink
add exeption handling when no milestone
Browse files Browse the repository at this point in the history
  • Loading branch information
Leow, Max committed May 18, 2022
1 parent e2c8655 commit a73851a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="testrail-data",
version="0.0.9",
version="0.0.10",
install_requires=[
"pandas",
"testrail-api>=1.10",
Expand Down
6 changes: 3 additions & 3 deletions testrail_data/_category.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ def get_runs(*mile_ids):
if df_run2.shape[0] > 0:
dataframes.append(df_run2)
return dataframes

dfs = get_runs(milestone_ids)
milestone = Milestones(self._session)
df_milestone = milestone.sub_milestones_to_dataframe(*milestone_ids).filter(['id'])
dfs.extend(get_runs(*df_milestone['id'].to_list()))
return pd.concat(dfs).reset_index(drop=False)
if df_milestone.shape[0] > 0:
dfs.extend(get_runs(*df_milestone['id'].to_list()))
return pd.concat(dfs).reset_index(drop=False) if dfs else pd.DataFrame()

def get_runs_by_plan(self, *plan_ids: int) -> list:
"""
Expand Down

0 comments on commit a73851a

Please sign in to comment.