Skip to content

TypeError When Scoring Decaying Map Challenge #259

Description

@sentry

Sentry Issue: BACKEND-4D

TypeError: unsupported operand type(s) for -: 'int' and 'str'
(9 additional frame(s) were not displayed)
...
  File "backend/exception_handler.py", line 50, in handle_exception
    raise exc
  File "rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "challenge/views.py", line 309, in post
    solve = challenge.points_plugin.score(user, team, flag, solve_set.filter(correct=True))
  File "plugins/points/base.py", line 29, in score
    points = self.get_points(team, flag, solves.count())
  File "plugins/points/decay.py", line 17, in get_points
    return int(round(min_points + ((challenge.score - min_points) * (decay_constant ** max(solves - 1, 0)))))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions