Fix new credo warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-26 14:30:46 +01:00
parent 52e624bb88
commit 51afec1856
20 changed files with 77 additions and 72 deletions

View File

@@ -39,7 +39,7 @@ defmodule Mobilizon.Service.Export.Participants.ODS do
|> Events.participant_for_event_export_query(Keyword.get(options, :roles, []))
|> Repo.all()
|> Enum.map(&to_list/1)
|> (fn data -> Enum.concat([columns()], data) end).()
|> add_header_columns()
|> generate_ods()
File.write!(full_path, content)
@@ -62,6 +62,10 @@ defmodule Mobilizon.Service.Export.Participants.ODS do
end
end
defp add_header_columns(data) do
Enum.concat([columns()], data)
end
defp generate_ods(data) do
data
|> Jason.encode!()