.MD

Copy the markdown below:

NoMethodError

app/models/contest_participant.rb:23

undefined method `optional_gender' for nil:NilClass

Backtrace

app/models/contest_participant.rb:23:in `block in <class:ContestParticipant>'
app/controllers/api/v1/contest_participants_controller.rb:215:in `create'

Request

Name Api::V1::ContestParticipantsController#create
Method POST
URL https://api.oblyk.org/api/v1/gyms/3/contests/284/contest_participants.json
Browser ChromeChrome 148

Parameters

{
  "action": "create",
  "format": "json",
  "gym_id": "3",
  "contest_id": "284",
  "controller": "api/v1/contest_participants",
  "contest_participant": {
    "email": "nora.bolze@gmail.com",
    "genre": "female",
    "gym_id": 3,
    "last_name": "BOLZE",
    "contest_id": 284,
    "first_name": "Nora",
    "date_of_birth": "2005-01-07"
  }
}

Headers

Host api.oblyk.org
Accept application/json, text/plain, */*
Cf-Ray a11ea7ff2ef07e1c-FRA
Origin https://oblyk.org
Referer https://oblyk.org/
Version HTTP/1.0
Cdn-Loop cloudflare; loops=1
Priority u=1, i
Sec-Ch-Ua "Chromium";v="148", "Google Chrome";v="148", "Not/A)Brand";v="99"
Cf-Visitor {"scheme":"https"}
Connection close
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Cf-Ipcountry FR
Authorization [FILTERED]
Sec-Fetch-Dest empty
Sec-Fetch-Mode cors
Sec-Fetch-Site same-site
Accept-Encoding gzip, br
Accept-Language fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
X-Forwarded-For 87.240.99.40, 172.70.240.13
Cf-Connecting-Ip 87.240.99.40
Sec-Ch-Ua-Mobile ?0
X-Forwarded-Proto https
Httpapiaccesstoken [FILTERED]
Sec-Ch-Ua-Platform "Windows"

Environment

os Linux 5.10.0-14-cloud-amd64
cwd /var/www/oblyk/api/releases/20260626102814
pid 2253692
host oblyk-api
ruby ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
user oblyk
rails 6.0.3.6
revision f8c046d65ff65576d5c8fefdf7a90c0dc882fe93

Server

Load CPU RAM Swap Disk
oblyk-api Load avg <1% CPU 3% RAM 48% Swap <1% Disk 44%

Deployments 2

Ajout du chemin vers le spaces pour le eagerloading clucien 26 Jun 10:28
Merge pull request #32 from oblyk/chore/brevo-gem Lucien Chastan 11 Jun 07:20