diff options
Diffstat (limited to 'wqflask')
-rw-r--r-- | wqflask/wqflask/templates/collections/list.html | 2 | ||||
-rw-r--r-- | wqflask/wqflask/user_session.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/wqflask/wqflask/templates/collections/list.html b/wqflask/wqflask/templates/collections/list.html index c8705c7d..94e22c4d 100644 --- a/wqflask/wqflask/templates/collections/list.html +++ b/wqflask/wqflask/templates/collections/list.html @@ -42,6 +42,7 @@ <tbody> {% for uc in collections %} + {% if uc.num_members > 0 %} <tr class="collection_line"> <td align="center" style="padding: 0px;"><INPUT TYPE="checkbox" NAME="collection" class="checkbox trait_checkbox" VALUE="{{ uc.id }}"></td> <td align="right">{{ loop.index }} @@ -50,6 +51,7 @@ <td>{{ uc.changed_timestamp }}</td> <td align="right">{{ uc.num_members }}</td> </tr> + {% endif %} {% endfor %} </tbody> </table> diff --git a/wqflask/wqflask/user_session.py b/wqflask/wqflask/user_session.py index ec6d4ae3..ba659fe5 100644 --- a/wqflask/wqflask/user_session.py +++ b/wqflask/wqflask/user_session.py @@ -167,7 +167,7 @@ class UserSession(object): def num_collections(self): """Number of user's collections""" - return len(self.user_collections) + return len([item for item in self.user_collections if item['num_members'] > 0]) def add_collection(self, collection_name, traits): """Add collection into Redis""" |