Do not require programs languages in controller

We did not set this in ProposalController#create so it was empty
if we the event validation failed and we rendered :new.

It makes little sense to assign this instance variable anyway, we already have
@program.
This commit is contained in:
Henne Vogelsang 2024-07-01 14:23:08 +02:00
parent ee4e88a755
commit e339133c56
No known key found for this signature in database
GPG key ID: 97DDB66BDAF8D4D6
3 changed files with 1 additions and 7 deletions

View file

@ -57,7 +57,6 @@ module Admin
@comment_count = @event.comment_threads.count
@user = @event.submitter
@url = admin_conference_program_event_path(@conference.short_title, @event)
@languages = @program.languages_list
end
def comment
@ -71,7 +70,6 @@ module Admin
end
def update
@languages = @program.languages_list
if @event.update(event_params)
if request.xhr?
@ -89,7 +87,6 @@ module Admin
def create
@url = admin_conference_program_events_path(@conference.short_title, @event)
@languages = @program.languages_list
@event.submitter = current_user
if @event.save
@ -102,7 +99,6 @@ module Admin
def new
@url = admin_conference_program_events_path(@conference.short_title, @event)
@languages = @program.languages_list
end
def accept