Skip to content

Commit

Permalink
fixed bug where result value was float instead int when decimal == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannik-PC committed Mar 16, 2021
1 parent 177f923 commit a1cdc85
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/visuanalytics/analytics/transform/calculate.py
Expand Up @@ -139,6 +139,8 @@ def _bi_calculate(values: dict, data: StepData, op):
# If decimal is present round
decimal = data.get_data(decimal, values, numbers.Number)
res = round(res, decimal)
if decimal == 0:
res = int(res)

data.insert_data(new_key, res, values)

Expand Down

0 comments on commit a1cdc85

Please sign in to comment.