Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Reverse get_indexable() so new stuff gets indexed first

This helps a ton during development since you can do:

    ./manage.py esreindex --percent=10

and get something useful that'll show up on the dashboard.

This will also help production since it'll populate the index with the
most recent stuff first.
  • Loading branch information...
commit fcbd87261d2a2c344a08934a9d433709ef0e0815 1 parent 640f749
@willkg willkg authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 fjord/feedback/models.py
View
6 fjord/feedback/models.py
@@ -159,6 +159,7 @@ def get_mapping(cls):
'prodchan': keyword_type(),
'happy': boolean_type(),
'url': keyword_type(),
+ 'has_email': boolean_type(),
'description': text_type(),
'description_bigrams': keyword_type(),
'user_agent': keyword_type(),
@@ -187,6 +188,7 @@ def empty_to_unknown(text):
'prodchan': obj.prodchan,
'happy': obj.happy,
'url': obj.url,
+ 'has_email': obj.responseemail_set.count() > 0,
'description': obj.description,
'user_agent': obj.user_agent,
'product': obj.product,
@@ -232,6 +234,10 @@ def get_products(cls):
cache.add(key, products)
return products
+ @classmethod
+ def get_indexable(cls):
+ return super(ResponseMappingType, cls).get_indexable().reverse()
+
class ResponseEmail(ModelBase):
"""Holds email addresses related to Responses."""

0 comments on commit fcbd872

Please sign in to comment.
Something went wrong with that request. Please try again.