mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-17 21:54:06 +00:00
Merge pull request #3550 from hennevogel/bugfix/conference-logos
Do not double assign attributes
This commit is contained in:
commit
8c1c451de1
3 changed files with 9 additions and 5 deletions
|
|
@ -90,7 +90,7 @@ module Admin
|
|||
@conference.assign_attributes(conference_params)
|
||||
send_mail_on_conf_update = @conference.notify_on_dates_changed?
|
||||
|
||||
if @conference.update(conference_params)
|
||||
if @conference.save
|
||||
ConferenceDateUpdateMailJob.perform_later(@conference) if send_mail_on_conf_update
|
||||
redirect_to edit_admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully updated.'
|
||||
|
|
|
|||
|
|
@ -45,10 +45,8 @@ module Admin
|
|||
@votes = @event.votes.includes(:user)
|
||||
@difficulty_levels = @program.difficulty_levels
|
||||
@versions = @event.versions |
|
||||
PaperTrail::Version.where(item_type: 'Commercial').where('object LIKE ?', "%commercialable_id: #{@event.id}\ncommercialable_type: Event%") |
|
||||
PaperTrail::Version.where(item_type: 'Commercial').where('object_changes LIKE ?', "%commercialable_id:\n- \n- #{@event.id}\ncommercialable_type:\n- \n- Event%") |
|
||||
PaperTrail::Version.where(item_type: 'Vote').where('object_changes LIKE ?', "%\nevent_id:\n- \n- #{@event.id}\n%") |
|
||||
PaperTrail::Version.where(item_type: 'Vote').where('object LIKE ?', "%\nevent_id: #{@event.id}\n%")
|
||||
@event.commercials.map(&:versions).flatten |
|
||||
@event.votes.map(&:versions).flatten
|
||||
end
|
||||
|
||||
def edit
|
||||
|
|
|
|||
|
|
@ -122,6 +122,12 @@ RSpec.configure do |config|
|
|||
@request.host = Rails.application.routes.default_url_options[:host]
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
Rails.logger.debug '======================================================================'
|
||||
Rails.logger.debug { "\n\n\n\t\t#{RSpec.current_example.metadata[:full_description]}\n\n\n" }
|
||||
Rails.logger.debug '======================================================================'
|
||||
end
|
||||
|
||||
# use the config to use
|
||||
# t('some.locale.key') instead of always having to type I18n.t
|
||||
config.include AbstractController::Translation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue