#1929: Fix the actions query breaking when querying actions with a non-existent tag

This commit is contained in:
Jyri-Petteri Paloposki 2019-05-21 15:17:50 +03:00
parent ebfa39d5a1
commit d784b1a5eb

View file

@ -27,6 +27,9 @@ module Todos
if params[:tag]
tag = Tag.where(:name => params[:tag]).first
if not tag
return []
end
not_done_todos = not_done_todos.joins(:taggings).where('taggings.tag_id = ?', tag.id)
end