1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-26 20:54:21 +01:00

fix export for missing users

This commit is contained in:
Sylvain 2016-07-13 18:09:32 +02:00
parent c863975e9c
commit e765267bb5
2 changed files with 6 additions and 6 deletions

View File

@ -32,9 +32,9 @@ wb.add_worksheet(name: @index.label) do |sheet|
subtype = get_item(@subtypes, hit['_source']['subType'], 'key')
data = [
Date::strptime(hit['_source']['date'],'%Y-%m-%d'),
user.profile.full_name,
user.email,
user.profile.phone,
(user ? user.profile.full_name : "ID #{hit['_source']['userId']}"),
(user ? user.email : ''),
(user ? user.profile.phone : ''),
t("export.#{hit['_source']['gender']}"),
hit['_source']['age'],
subtype.nil? ? "" : subtype.label

View File

@ -30,9 +30,9 @@ date = wb.styles.add_style :format_code => Rails.application.secrets.excel_date_
# start to fill data and associated styles and data-types
data = [
Date::strptime(hit['_source']['date'],'%Y-%m-%d'),
user.profile.full_name,
user.email,
user.profile.phone,
(user ? user.profile.full_name : "ID #{hit['_source']['userId']}"),
(user ? user.email : ''),
(user ? user.profile.phone : ''),
t("export.#{hit['_source']['gender']}"),
hit['_source']['age'],
subtype.nil? ? "" : subtype.label