Changeset 455 in main


Ignore:
Timestamp:
11/05/11 11:02:27 (8 years ago)
Author:
pcosquer
Message:

fix a bug when an user changes its language setting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openPLM/urls.py

    r450 r455  
    4040from django.contrib import admin 
    4141admin.autodiscover() 
     42 
     43# just a hack to prevent a KeyError 
     44from haystack.models import SearchResult 
     45def get_state(self): 
     46    ret_dict = self.__dict__.copy() 
     47    if 'searchsite' in ret_dict: 
     48        del(ret_dict['searchsite']) 
     49    del(ret_dict['log']) 
     50    return ret_dict 
     51SearchResult.__getstate__ = get_state 
     52 
    4253 
    4354urlpatterns = patterns('') 
Note: See TracChangeset for help on using the changeset viewer.