From 55a698af83b4382b82c1cfee97f303f4a7ec284e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 21:28:55 +0000 Subject: [PATCH 1/2] Initial plan From 7c6d5ff7f3d5314156a92c28b4873085cc6df67a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 21:37:18 +0000 Subject: [PATCH 2/2] Fix ValueError in staking pool creation for empty parameters Co-authored-by: DonnieBLT <128622481+DonnieBLT@users.noreply.github.com> --- website/views/staking_competitive.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/website/views/staking_competitive.py b/website/views/staking_competitive.py index 15bf9e8a38..fb17500dbd 100644 --- a/website/views/staking_competitive.py +++ b/website/views/staking_competitive.py @@ -412,8 +412,10 @@ def create_staking_pool(request): description = request.POST.get("description") pool_type = request.POST.get("pool_type", "head_to_head") challenge_id = request.POST.get("challenge_id") - stake_amount = Decimal(request.POST.get("stake_amount", "0")) - days_duration = int(request.POST.get("days_duration", "7")) + stake_amount_str = request.POST.get("stake_amount") or "0" + days_duration_str = request.POST.get("days_duration") or "7" + stake_amount = Decimal(stake_amount_str) + days_duration = int(days_duration_str) # Validate inputs if not all([name, description, challenge_id]) or stake_amount <= 0: