Browse Source

Fix for null arrival and departure times in stats.xls

development
Godwin 9 years ago
parent
commit
d34f26c4d0
  1. 6
      app/controllers/conferences_controller.rb

6
app/controllers/conferences_controller.rb

@ -471,11 +471,11 @@ class ConferencesController < ApplicationController
@excel_data[:data] << {
:name => user.firstname,
:email => user.email,
:date => r.created_at.strftime("%F %T"),
:date => r.created_at ? r.created_at.strftime("%F %T") : nil,
:city => r.city,
:languages => ((JSON.parse(r.languages || '[]').map { |x| I18n.t"languages.#{x}" }).join(', ').to_s),
:arrival => r.arrival.strftime("%F %T"),
:departure => r.departure.strftime("%F %T"),
:arrival => (r.arrival || @this_conference.start_date).strftime("%F %T"),
:departure => (r.departure || @this_conference.end_date).strftime("%F %T"),
:housing => (I18n.t"articles.conference_registration.questions.housing.#{r.housing || 'none'}"),
:bike => (I18n.t"articles.conference_registration.questions.bike.#{r.bike || 'none'}"),
:food => (I18n.t"articles.conference_registration.questions.food.#{r.food || 'meat'}"),

Loading…
Cancel
Save