Skip to content

Commit

Permalink
Correct check condition on group field (#493)
Browse files Browse the repository at this point in the history
  • Loading branch information
LightOfHeaven1994 authored Apr 18, 2024
1 parent 95cd732 commit 5801455
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/ibutsu_server/widgets/filter_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _get_heatmap(filters, builds, group_field, project=None):

# generate the group_field
group_field = string_to_column(group_field, Run)
if not group_field:
if group_field is None:
return {}

# get the runs on which to run the aggregation, we select from a subset of runs to improve
Expand Down
2 changes: 1 addition & 1 deletion backend/ibutsu_server/widgets/jenkins_heatmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _get_heatmap(job_name, builds, group_field, count_skips, project=None, addit

# generate the group_fields
group_field = string_to_column(group_field, Run)
if not group_field:
if group_field is None:
return {}, builds

job_name = string_to_column("metadata.jenkins.job_name", Run)
Expand Down
2 changes: 1 addition & 1 deletion backend/ibutsu_server/widgets/result_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _get_recent_result_data(group_field, days, project=None, run_id=None, additi

# generate the group field
group_field = string_to_column(group_field, Result)
if not group_field:
if group_field is None:
return []

# create the query
Expand Down
3 changes: 2 additions & 1 deletion backend/ibutsu_server/widgets/run_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def _get_recent_run_data(weeks, group_field, project=None, additional_filters=No

# generate the group field
group_field = string_to_column(group_field, Run)
if not group_field:

if group_field is None:
return data

# create the query
Expand Down

0 comments on commit 5801455

Please sign in to comment.