Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction lien cassé plage ouvertures avec un point #4407

Closed
sentry-sentry-incubateur-net bot opened this issue Jul 4, 2024 · 1 comment · Fixed by #4409
Closed

Correction lien cassé plage ouvertures avec un point #4407

sentry-sentry-incubateur-net bot opened this issue Jul 4, 2024 · 1 comment · Fixed by #4409
Labels

Comments

@sentry-sentry-incubateur-net
Copy link

sentry-sentry-incubateur-net bot commented Jul 4, 2024

La visite d’une page comme admin/organisations/1234/agents/567/plage_ouvertures déclenche des requêtes sur /admin/agenda/plage_ouvertures.567. Je n’arrive pas trop à dire si c’est suite à une visite d’un lien ou bien un appel qui se fait depuis le JS

J’arrive à reproduire en cliquant sur le lien "vue calendrier"

Sentry Issue: LAPINS-167

ActiveRecord::RecordNotFound: Couldn't find Agent without an ID (ActiveRecord::RecordNotFound)
  app/controllers/admin/agenda/plage_ouvertures_controller.rb:3:in `index'
    @agent = Agent.find(params[:agent_id])
  config/initializers/cookie_overflow_notify.rb:10:in `call'
    @app.call(env)
...
(245 additional frame(s) were not displayed)
@francois-ferrandis
Copy link
Contributor

Ça sent à plein nez l'appel à un helper du genre

plage_ouverture_bidule_path(agent.id)

et donc le moteur de route comprend que agent.id est le format de la requête (json/html).

Il aurait fallu appeler explicitement :

plage_ouverture_bidule_path(agent_id: agent.id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant