Skip to content

Commit

Permalink
Fixed bug in .filter() to URL encode attributes. Also got Company.fil…
Browse files Browse the repository at this point in the history
…ter() working.
  • Loading branch information
jasford committed Sep 9, 2011
1 parent 1e2cf41 commit 1023cd5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pyrise/__init__.py
@@ -1,10 +1,11 @@
import httplib2
import urllib
import re
import sys
import datetime
from xml.etree import ElementTree

__version__ = '0.3.0'
__version__ = '0.3.1'

class Highrise:
"""Class designed to handle all interactions with the Highrise API."""
Expand Down Expand Up @@ -616,11 +617,11 @@ def filter(cls, **kwargs):
else:
path = '/%s/search.xml?' % cls.plural
for key in kwargs:
path += 'criteria[%s]=%s&' % (key, kwargs[key])
path += 'criteria[%s]=%s&' % (key, urllib.quote(kwargs[key]))
path = path[:-1]

# return the list of people from Highrise
return cls._list(path, 'person')
return cls._list(path, cls.singular)

@classmethod
def get(cls, id):
Expand Down

0 comments on commit 1023cd5

Please sign in to comment.