Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
erp5
Commits
aa98df88
Commit
aa98df88
authored
Aug 18, 2016
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_discussion: remove useless statements
added possibly by mistake. see
1cb54350
parent
1a9572e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.py
...s/erp5_discussion/WebSection_createNewDiscussionThread.py
+15
-19
No files found.
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.py
View file @
aa98df88
...
@@ -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,23 +23,21 @@ if site_list in MARKER:
...
@@ -24,23 +23,21 @@ 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)
# which ID or reference duplicates just add some random part
# which ID or reference duplicates just add some random part
# so we can distinguish)
# so we can distinguish)
reference
=
'%s-%s'
%
(
context
.
Base_generateRandomString
(),
reference
)
reference
=
'%s-%s'
%
(
context
.
Base_generateRandomString
(),
reference
)
category_list
=
[]
category_list
=
[]
create_kw
=
dict
(
title
=
title
,
create_kw
=
dict
(
title
=
title
,
...
@@ -54,10 +51,9 @@ create_kw = dict(title = title,
...
@@ -54,10 +51,9 @@ 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
)])
discussion_thread
=
portal
.
discussion_thread_module
.
newContent
(
discussion_thread
=
portal
.
discussion_thread_module
.
newContent
(
portal_type
=
"Discussion Thread"
,
portal_type
=
"Discussion Thread"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment