Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
while path:
Browse files Browse the repository at this point in the history
  • Loading branch information
camsom committed May 23, 2016
1 parent 019401a commit 1903834
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bulbs/utils/tunic.py
Expand Up @@ -40,14 +40,12 @@ def get_campaigns(self, filter_active=False):
path = "/campaign/"
if filter_active:
path += "?active=True"
while True:
while path:
resp = self.get(path).json()
campaigns.update({
c["id"]: c for c in resp.get("results", {})
})
path = resp.get("next")
if not path:
break
return campaigns

def get_active_campaigns(self):
Expand Down

0 comments on commit 1903834

Please sign in to comment.