Skip to content
Snippets Groups Projects
Commit a9c700ff authored by rinpatch's avatar rinpatch
Browse files

Fix wrong argument order when calling NaiveDateTime.diff

parent 84a40f6f
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ def get_by_id_and_maybe_refetch(id, opts \\ []) do
%{updated_at: updated_at} = object = get_by_id(id)
if opts[:interval] &&
NaiveDateTime.diff(updated_at, NaiveDateTime.utc_now()) > opts[:interval] do
NaiveDateTime.diff(NaiveDateTime.utc_now(), updated_at) > opts[:interval] do
case Fetcher.refetch_object(object) do
{:ok, %Object{} = object} ->
object
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment