Namespace serialization fixes

This commit is contained in:
Connor Rigby 2017-12-10 21:56:01 -08:00
parent 70fceb928b
commit 99ec1d31cb

View file

@ -101,9 +101,9 @@ defmodule Farmbot.Farmware.Runtime do
true -> nil
end
ns = if sep do
String.split(fw_name, sep) |> Enum.join() |> String.downcase() |> Macro.underscore()
String.split(fw_name |> Macro.underscore(), sep) |> Enum.join() |> String.downcase() |> Macro.underscore()
else
fw_name |> String.downcase()
fw_name |> Macro.underscore() |> String.downcase()
end
{"#{ns}_#{name}", val}
end