Skip to content

Commit

Permalink
Fix getting max_points value for TIDEPluginData
Browse files Browse the repository at this point in the history
  • Loading branch information
saviit committed Mar 6, 2025
1 parent 76e0c4a commit ed43a4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion timApp/idesupport/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
from timApp.timdb.sqa import run_sql
from timApp.user.user import User
from timApp.util.flask.requesthelper import NotExist, RouteException
from timApp.util.logger import log_info
from tim_common.marshmallow_dataclass import class_schema

IDE_TASK_TAG = "ideTask" # Identification tag for the TIDE-task
Expand Down Expand Up @@ -743,7 +744,11 @@ def get_ide_user_plugin_data(
elif "source" in extra_file:
supplementary_files.append(SupplementaryFileSchema.load(extra_file))

max_points = plugin.values.get("pointsRule", {}).get("maxPoints", None)
max_points = None
try:
max_points = float(plugin.max_points())
except ValueError as e:
pass

return TIDEPluginData(
task_files=json_ide_files,
Expand Down

0 comments on commit ed43a4b

Please sign in to comment.