Skip to content

Commit

Permalink
No need to set empty index value.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith committed Jun 3, 2015
1 parent 4efb2d3 commit 328d2e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vumi/persist/fields.py
Expand Up @@ -50,10 +50,10 @@ def _add_index(self, modelobj, value):
# XXX: The underlying libraries call str() on whatever index values we
# provide, so we do this explicitly here and special-case None.
if value is None:
value = ''
if STORE_NONE_FOR_EMPTY_INDEX:
# FIXME: We still rely on this being "None" in places. :-(
value = 'None'
# Hackery for things that need "None" index values.
modelobj._riak_object.add_index(self.index_name, "None")
return
modelobj._riak_object.add_index(self.index_name, str(value))

def set_value(self, modelobj, value):
Expand Down

0 comments on commit 328d2e5

Please sign in to comment.