Skip posts in indexer where publish date is nil
This commit is contained in:
parent
d5828f1c5e
commit
4c0911592b
|
@ -30,7 +30,7 @@ def object_to_search_data(object) do
|
||||||
trimmed
|
trimmed
|
||||||
end
|
end
|
||||||
|
|
||||||
if String.length(content) > 1 do
|
if String.length(content) > 1 and not is_nil(data["published"]) do
|
||||||
{:ok, published, _} = DateTime.from_iso8601(data["published"])
|
{:ok, published, _} = DateTime.from_iso8601(data["published"])
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
|
@ -128,7 +128,7 @@ def object_to_search_data(object) do
|
||||||
trimmed
|
trimmed
|
||||||
end
|
end
|
||||||
|
|
||||||
if String.length(content) > 1 do
|
if String.length(content) > 1 and not is_nil(data["published"]) do
|
||||||
{:ok, published, _} = DateTime.from_iso8601(data["published"])
|
{:ok, published, _} = DateTime.from_iso8601(data["published"])
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
Loading…
Reference in a new issue