Skip to content

【イベント】【新規作成】ユーザグループが空でもイベントを作れてしまう(なお誰もアクセスはできない) #272

@atomisu0312

Description

@atomisu0312

Which feature would you like to see added or improve
【イベント】

Describe the solution you'd like

ユーザグループを入力しなくてもイベントが作れてしまい、かつ、リダイレクト時に404と出てしまうエラーが確認されました。

流れを記述すると、以下のことがわかりました。

  • フォーム上のフィールド(user_group)が空欄の状態で渡される
  • バリデーション時にエラーとならず0として解釈
  • userGroupIdが0となり、そんなグループは存在しないので誰もアクセスできない。

以下の対策の両方を実施します。

  • 新規グループ作成画面において、デフォルト値としてユーザグループを入れる
  • バリデーションで弾かれるようにする

ご迷惑をおかけいたしました。

TODO
流れをざっくり書いておく(あとでサブIssue化するのもあり)

  • 確認
  • バリデーションロジックの修正
  • 画面において、デフォルトの値を入れるように

Which directory to change
例:front/src/内でeventに紐づくもの全て

Describe alternatives you've considered

  • front/src/actions/event/register/viewmodel.ts M
  • front/src/components/templates/event/register/EventRegisterTemplate.tsx M

Additional context
なし

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions