Skip to content

Multiple single choice answer updating requests can kill the backend and its connection to the database #38

Description

@tuku13

When the hx-put is placed in the form instead of the inputs on the single-choice-question component, two requests are getting sent to the backend. The backend returns this error: failed to deallocate cached statement(s): conn bus. Maybe it comes from the db driver package.

questions.templ, SingleChoiceQuestion component's form tag:

  if props.QuizSession != nil {
    hx-put={ fmt.Sprintf(`/quiz-sessions/%s/answers`, props.QuizSession.Id) }
    hx-vals={ fmt.Sprintf(`js:{ "questionId": "%s", "answerType": "single-choice" }`, props.Question.Id) }
    hx-trigger="change from:input[type='radio']"
    hx-swap="none"
  }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions