# HG changeset patch # User ymh # Date 1310397630 -7200 # Node ID 84dc6383323d0d1a16eeb044bf53522cca049fea # Parent 1c4729b3dac16a2e1c9ebdef5023894ff28a0b46 Correction bug #20. The solution is mainly to make sure that the index is recalculated - small optimization diff -r 1c4729b3dac1 -r 84dc6383323d web/hdabo/wp_utils.py --- a/web/hdabo/wp_utils.py Mon Jul 11 17:03:23 2011 +0200 +++ b/web/hdabo/wp_utils.py Mon Jul 11 17:20:30 2011 +0200 @@ -178,11 +178,8 @@ results = SearchQuerySet().filter(title=ts.tag.label).filter_or(description=ts.tag.label).filter(**kwargs) if len(results) > 0: ts.index_note += results[0].score -# results = SearchQuerySet().filter(description=ts.tag.label).filter(**kwargs) -# if len(results) > 0: -# ts.index_note += results[0].score + ts.save() - ts.save() ts_list.append(ts) ts_list.sort(key=lambda t: (-t.index_note, t.order)) for k, ts in enumerate(ts_list):