Skip to content

Commit

Permalink
fix comment in sample
Browse files Browse the repository at this point in the history
  • Loading branch information
jacalata committed Oct 11, 2024
1 parent 7c58b5a commit af6f290
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions samples/filter_sort_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,18 @@ def main():

print("----")
# or, try the above with the django style filtering.
"""
bug: hangs getting the version for this request? Also should be order_by, not sort
groups = ["SALES NORTHWEST", "SALES ROMANIA", "this_group"]
groups = [urllib.parse.quote_plus(group) for group in groups]
for group in server.groups.filter(name__in=groups).order_by("-name"):
print(group.name)
"""
all_g = server.groups.all()
print(f"Searching locally among {all_g.total_available} groups")
for a in all_g:
print(a)
groups = [urllib.parse.quote_plus(group) for group in ["SALES NORTHWEST", "SALES ROMANIA", "this_group"]]
print(groups)

# BUG: this loop seems to continue making requests long after we've seen all groups
#for group in server.groups.filter(name__in=groups).order_by("-name"):
# print(group.name)

print("done")


if __name__ == "__main__":
Expand Down

0 comments on commit af6f290

Please sign in to comment.