Fix for null arrival and departure times in stats.xls
This commit is contained in:
parent
0a4e9857ad
commit
d34f26c4d0
@ -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…
x
Reference in New Issue
Block a user