~cedric/freshermeat

fae2b332e36068096f4b963109b23aa6c5b0723c — C├ędric Bonhomme 10 days ago e6977ee
chg: [api v2] it is now possible to filter GET requests with attributes.
1 files changed, 5 insertions(+), 2 deletions(-)

M freshermeat/web/views/api/v2/project.py
M freshermeat/web/views/api/v2/project.py => freshermeat/web/views/api/v2/project.py +5 -2
@@ 96,10 96,13 @@ class ProjectsList(Resource):

        try:
            query = Project.query
            for arg in args:
                if hasattr(Project, arg):
                    query = query.filter(getattr(Project, arg) == args[arg])
            total = query.count()
            projects = query.all()
            count = 0
        except Exception:
            count = total
        except:
            return result, 200
        finally:
            if not projects: