forked from potsda.mn/mobilizon
Fix tests
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bdc16bad6b
commit
e32ce85f0f
|
@ -64,8 +64,8 @@ defmodule MobilizonWeb.Resolvers.Event do
|
|||
end
|
||||
|
||||
def create_event(_parent, args, %{context: %{current_user: user}}) do
|
||||
organizer_actor_id = Map.get(args, "organizer_actor_id") || Actors.get_actor_for_user(user).id
|
||||
args = args |> Map.put("organizer_actor_id", organizer_actor_id)
|
||||
organizer_actor_id = Map.get(args, :organizer_actor_id) || Actors.get_actor_for_user(user).id
|
||||
args = args |> Map.put(:organizer_actor_id, organizer_actor_id)
|
||||
Mobilizon.Events.create_event(args)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
defmodule Mobilizon.Repo.Migrations.AlterEventTimestampsToDateTimeWithTimeZone do
|
||||
defmodule Mobilizon.Repo.Migrations.RevertAlterEventTimestampsToDateTimeWithTimeZone do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table("events") do
|
||||
alter table(:events) do
|
||||
modify :inserted_at, :timestamptz
|
||||
modify :updated_at, :timestamptz
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table("events") do
|
||||
alter table(:events) do
|
||||
modify :inserted_at, :utc_datetime
|
||||
modify :updated_at, :utc_datetime
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue