mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-26 12:08:47 +01:00
#1929: Fix the actions query breaking when querying actions with a non-existent tag
This commit is contained in:
parent
ebfa39d5a1
commit
d784b1a5eb
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue