Update of "reinitialize" button : Test if a content have a front_project before catching its id
--- a/src/ldt/ldt/ldt_utils/views/project.py Wed Sep 19 18:16:19 2012 +0200
+++ b/src/ldt/ldt/ldt_utils/views/project.py Thu Sep 20 12:35:15 2012 +0200
@@ -103,11 +103,11 @@
contents = project.contents.all()
groups = request.user.groups.exclude(name=settings.PUBLIC_GROUP_NAME)
member_list, admin_list = get_userlist_model(project, request.user)
+ display_reset= False
- if contents[0].front_project.ldt_id == ldt_id:
- display_reset = True
- else:
- display_reset= False
+ if contents[0].front_project != None:
+ if contents[0].front_project.ldt_id == ldt_id:
+ display_reset = True
if request.method == "POST" :
submit_action = request.REQUEST.get("submit_button", False)