Skip to content

Commit

Permalink
mail_admins on errors..
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Klass committed Apr 4, 2013
1 parent da10b34 commit f88e06e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions appsearch/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,11 +419,13 @@ def reverse_field_hash(self, hash):
""" Returns the hash of field ORM paths derived from the initial configuration. """

hashes = map(itemgetter(0), self.get_searchable_field_choices())

try:
return self._fields.keys()[hashes.index(hash)]
except IndexError:
raise ValueError("Unknown field hash")
# raise ValueError("Unknown field hash")
# TODO Fix me!
log.exception("Unknown field hash")
return None

def get_display_fields(self):
""" Returns the list of labels for the display fields. """
Expand Down

0 comments on commit f88e06e

Please sign in to comment.