dcramer / django-sphinx

A transparent layer for full-text search using Sphinx and Django
http://groups.google.com/group/django-sphinx
BSD 3-Clause "New" or "Revised" License
357 stars 122 forks source link

Typo in new mode kwargs include #1

Closed cyface closed 15 years ago

cyface commented 15 years ago

Line 270 in models.py:

kwargs['mode'] = getattr(sphinxapi, kwargs.get('mode', 'SPH_MATCH_ALL'))

instead of

kwargs['mode'] = getattr(sphinxapi, kwargs.get('mode'), 'SPH_MATCH_ALL')

I was getting:

getattr(): attribute name must be string

because there was no default value being supplied...

Cheers and thanks for all your work on this!

Tim

dcramer commented 15 years ago

Fixed, thanks!