From f88e06ea9c370aeb7ff218c4fea599f096634488 Mon Sep 17 00:00:00 2001 From: Steven Klass Date: Thu, 4 Apr 2013 12:14:15 -0700 Subject: [PATCH] mail_admins on errors.. --- appsearch/registry.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/appsearch/registry.py b/appsearch/registry.py index 1335718..76e88fc 100644 --- a/appsearch/registry.py +++ b/appsearch/registry.py @@ -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. """