Skip to content

Instantly share code, notes, and snippets.

@rudigiesler
Created August 29, 2014 08:32
Show Gist options
  • Save rudigiesler/be6b94e1c9516dd61855 to your computer and use it in GitHub Desktop.
Save rudigiesler/be6b94e1c9516dd61855 to your computer and use it in GitHub Desktop.
diff --git a/go_contacts/backends/groups.py b/go_contacts/backends/groups.py
index bf8638a..cc431b1 100644
--- a/go_contacts/backends/groups.py
+++ b/go_contacts/backends/groups.py
@@ -147,6 +147,7 @@ class RiakGroupsCollection(object):
max_results = max_results or float('inf')
max_results = min(max_results, self.max_groups_per_page)
+ # Encoding and decoding are the same operation
cursor = self._encode_cursor(cursor)
group_list = yield self.contact_store.list_groups()
diff --git a/verified-fake/fake_go_contacts.py b/verified-fake/fake_go_contacts.py
index a7109a9..13e0fe6 100644
--- a/verified-fake/fake_go_contacts.py
+++ b/verified-fake/fake_go_contacts.py
@@ -221,6 +221,8 @@ class FakeGroups(object):
def get_page_groups(self, query, cursor, max_results):
groups = self.get_all_groups(query)
+
+ # Encoding and decoding are the same operation
cursor = self._encode_cursor(cursor)
max_results = (max_results and int(max_results)) or float('inf')
max_results = min(max_results, self.max_groups_per_page)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment