mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
Merge pull request #2237 from ZeiP/bug/context_change_hidden_fails
Fixed bug causing context change to hidden returning a server error
This commit is contained in:
commit
ef567c0952
1 changed files with 2 additions and 0 deletions
|
|
@ -75,8 +75,10 @@ class ApplicationController < ActionController::Base
|
|||
if todos_parent.nil?
|
||||
count = 0
|
||||
elsif (todos_parent.is_a?(Project) && todos_parent.hidden?)
|
||||
init_hidden_todo_counts(['project']) if !@project_hidden_todo_counts
|
||||
count = @project_hidden_todo_counts[todos_parent.id]
|
||||
elsif (todos_parent.is_a?(Context) && todos_parent.hidden?)
|
||||
init_hidden_todo_counts(['context']) if !@context_hidden_todo_counts
|
||||
count = @context_hidden_todo_counts[todos_parent.id]
|
||||
else
|
||||
count = eval "@#{todos_parent.class.to_s.downcase}_not_done_counts[#{todos_parent.id}]"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue