Skip to content

Commit

Permalink
Merge pull request #523 from EverythingMe/feature/new_home
Browse files Browse the repository at this point in the history
Fix: global_recent isnt set if user has enough recents
  • Loading branch information
arikfr committed Aug 6, 2015
2 parents 1ef94b7 + b1ceb60 commit 3dea630
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions redash/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ class DashboardRecentAPI(BaseResource):
def get(self):
recent = [d.to_dict() for d in models.Dashboard.recent(current_user.id)]

global_recent = []
if len(recent) < 10:
global_recent = [d.to_dict() for d in models.Dashboard.recent()]

Expand Down Expand Up @@ -366,6 +367,7 @@ class QueryRecentAPI(BaseResource):
def get(self):
recent = [d.to_dict() for d in models.Query.recent(current_user.id)]

global_recent = []
if len(recent) < 10:
global_recent = [d.to_dict() for d in models.Query.recent()]

Expand Down

0 comments on commit 3dea630

Please sign in to comment.