# HG changeset patch # User verrierj # Date 1328106574 -3600 # Node ID 39a7b09be44f11618fcb5a12c13d69b54305c9e6 # Parent 499eca233839411976af48f251e39bd53495da5c Stats are updated correctly when a project is unpublished diff -r 499eca233839 -r 39a7b09be44f src/ldt/ldt/ldt_utils/stat.py --- a/src/ldt/ldt/ldt_utils/stat.py Wed Feb 01 14:34:43 2012 +0100 +++ b/src/ldt/ldt/ldt_utils/stat.py Wed Feb 01 15:29:34 2012 +0100 @@ -41,18 +41,16 @@ def update_stat_project(project, contents_only=[]): - if project.state != 2: - return None - if contents_only: - contents = contents_only - else: - contents = project.contents.all() + if contents_only: + contents = contents_only + else: + contents = project.contents.all() - for c in contents: - update_stat_content(c) + for c in contents: + update_stat_content(c) - return True + return True def add_annotation_to_stat(content, begin, end, polemics=[]):