Commit aa98df88 authored by Tristan Cavelier's avatar Tristan Cavelier

erp5_discussion: remove useless statements

added possibly by mistake.

see 1cb54350
parent 1a9572e4
...@@ -10,7 +10,6 @@ person = portal.ERP5Site_getAuthenticatedMemberPersonValue() ...@@ -10,7 +10,6 @@ person = portal.ERP5Site_getAuthenticatedMemberPersonValue()
version = '001' version = '001'
language = portal.Localizer.get_selected_language() language = portal.Localizer.get_selected_language()
has_website = context.getWebSiteValue() is not None
try: try:
user_assignment_dict = portal.ERP5Site_getPersonAssignmentDict() user_assignment_dict = portal.ERP5Site_getPersonAssignmentDict()
...@@ -24,17 +23,15 @@ if site_list in MARKER: ...@@ -24,17 +23,15 @@ if site_list in MARKER:
site_list = user_assignment_dict['site_list'] site_list = user_assignment_dict['site_list']
# set predicate settings for current Web Section # set predicate settings for current Web Section
if has_website: membership_criterion_category_list = context.getMembershipCriterionCategoryList()
membership_criterion_category_list = context.getMembershipCriterionCategoryList() multimembership_criterion_base_category_list = context.getMultimembershipCriterionBaseCategoryList()
multimembership_criterion_base_category_list = context.getMultimembershipCriterionBaseCategoryList()
reference = context.Base_generateReferenceFromString(title) reference = context.Base_generateReferenceFromString(title)
if has_website: existing_document = context.getDocumentValue(reference)
existing_document = context.getDocumentValue(reference) existing_web_section_list = portal.portal_catalog(id=reference, portal_type=['Web Site', 'Web Section'])
existing_web_section_list = portal.portal_catalog(id=reference, portal_type=['Web Site', 'Web Section']) existing_module_list = portal.portal_catalog(id=reference, parent_uid=portal.getUid())
existing_module_list = portal.portal_catalog(id=reference, parent_uid=portal.getUid()) if existing_document is not None \
if existing_document is not None \
or len(existing_web_section_list) \ or len(existing_web_section_list) \
or len(existing_module_list): or len(existing_module_list):
# if there are other document or any tarversal objects (module, web section) # if there are other document or any tarversal objects (module, web section)
...@@ -54,8 +51,7 @@ create_kw = dict(title = title, ...@@ -54,8 +51,7 @@ create_kw = dict(title = title,
group_list=group_list, group_list=group_list,
site_list=site_list) site_list=site_list)
if has_website: for base_category in multimembership_criterion_base_category_list:
for base_category in multimembership_criterion_base_category_list:
#create_kw['%s_list' %base_category] = [x for x in membership_criterion_category_list if x.startswith(base_category)] #create_kw['%s_list' %base_category] = [x for x in membership_criterion_category_list if x.startswith(base_category)]
category_list.extend([x for x in membership_criterion_category_list if x.startswith(base_category)]) category_list.extend([x for x in membership_criterion_category_list if x.startswith(base_category)])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment