From 1b98b6183c2a09e5ec51e4d84a5e17272546a1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Garc=C3=ADa?= Date: Tue, 11 Jun 2013 13:35:21 -0300 Subject: [PATCH] fix empty lists --- pyfb/__init__.py | 2 +- pyfb/client.py | 2 +- pyfb/utils.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfb/__init__.py b/pyfb/__init__.py index f168a79..37055b8 100644 --- a/pyfb/__init__.py +++ b/pyfb/__init__.py @@ -14,7 +14,7 @@ # MA 02110-1301, USA. __author__ = "Juan Manuel Garcia" -__version__ = "0.4.1" +__version__ = "0.4.2" __license__ = 'GPL v3' from pyfb import Pyfb, PyfbException diff --git a/pyfb/client.py b/pyfb/client.py index 91b5079..095f9f6 100755 --- a/pyfb/client.py +++ b/pyfb/client.py @@ -200,7 +200,7 @@ def get_list(self, id, path, object_name=None): obj = self.get_one(path, object_name) obj_list = self.factory.make_paginated_list(obj, object_name) - if not obj_list: + if obj_list == False: obj_list = obj.get("data") return obj_list diff --git a/pyfb/utils.py b/pyfb/utils.py index 5e3cabb..757a4ea 100644 --- a/pyfb/utils.py +++ b/pyfb/utils.py @@ -74,7 +74,7 @@ def make_objects_list(self, name, data): def make_paginated_list(self, obj, object_name): objs = getattr(obj, object_name, False) - if not objs: + if objs == False: return False objs_list = PaginatedList(objs, obj, object_name)