turn the inner map into an object too
This commit is contained in:
parent
d6b74f47ab
commit
723a64ef9d
1 changed files with 3 additions and 2 deletions
|
@ -499,10 +499,10 @@ index 000000000..1b1e439e0
|
||||||
+end
|
+end
|
||||||
diff --git a/lib/mix/tasks/migrator/import/statuses.ex b/lib/mix/tasks/migrator/import/statuses.ex
|
diff --git a/lib/mix/tasks/migrator/import/statuses.ex b/lib/mix/tasks/migrator/import/statuses.ex
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..e96aa2f3c
|
index 000000000..9d4c46bef
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/lib/mix/tasks/migrator/import/statuses.ex
|
+++ b/lib/mix/tasks/migrator/import/statuses.ex
|
||||||
@@ -0,0 +1,23 @@
|
@@ -0,0 +1,24 @@
|
||||||
+defmodule Mix.Tasks.Pleroma.Migrator.Import.Statuses do
|
+defmodule Mix.Tasks.Pleroma.Migrator.Import.Statuses do
|
||||||
+ use Mix.Task
|
+ use Mix.Task
|
||||||
+ import Mix.Pleroma
|
+ import Mix.Pleroma
|
||||||
|
@ -519,6 +519,7 @@ index 000000000..e96aa2f3c
|
||||||
+ params =
|
+ params =
|
||||||
+ Jason.decode!(line)
|
+ Jason.decode!(line)
|
||||||
+ |> keys_to_atoms
|
+ |> keys_to_atoms
|
||||||
|
+ |> loop_fields([:object], &keys_to_atoms/1)
|
||||||
+ |> loop_fields([:inserted_at, :updated_at], &parse_timestamp/1)
|
+ |> loop_fields([:inserted_at, :updated_at], &parse_timestamp/1)
|
||||||
+ |> Map.delete(:id)
|
+ |> Map.delete(:id)
|
||||||
+
|
+
|
||||||
|
|
Reference in a new issue