mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
Fix the tag-specific listing to fetch the user's specific tag instead of the first one in a multi-user environment.
This commit is contained in:
parent
75e5c98ce6
commit
03ab384b9c
1 changed files with 1 additions and 1 deletions
|
@ -907,7 +907,7 @@ end
|
||||||
def find_todos_with_tag_expr(tag_expr)
|
def find_todos_with_tag_expr(tag_expr)
|
||||||
# optimize for the common case: selecting only one tag
|
# optimize for the common case: selecting only one tag
|
||||||
if @single_tag
|
if @single_tag
|
||||||
tag = Tag.where(:name => @tag_name).first
|
tag = current_user.tags.where(:name => @tag_name).first
|
||||||
tag_id = tag.nil? ? -1 : tag.id
|
tag_id = tag.nil? ? -1 : tag.id
|
||||||
return current_user.todos.with_tag(tag_id)
|
return current_user.todos.with_tag(tag_id)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue