diff --git a/bi/models/dashboard.py b/bi/models/dashboard.py index 94b789d62f5291666403981c7b7c9313f96641cd..204f1aabaa6aa2af6a5110fba5526cbcf336d2fa 100644 --- a/bi/models/dashboard.py +++ b/bi/models/dashboard.py @@ -110,7 +110,7 @@ class Dashboard(Document): # Check unique processed = [] access = [] - for da in sorted(self.access, reverse=True): + for da in sorted(self.access, reverse=True, key=lambda x: x.level): # Deduplicate rights # @todo changing priority (reverse order) if da.user and "u%d" % da.user.id in processed: