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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
560ccc5d
Commit
560ccc5d
authored
Oct 20, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: create an Active Process for successful case as well if the last result is bad.
parent
20c95080
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_checkDuplicateLoginReferenceLogin.py
...s/erp5_base/ERP5Site_checkDuplicateLoginReferenceLogin.py
+12
-5
No files found.
bt5/erp5_base/SkinTemplateItem/portal_skins/erp5_base/ERP5Site_checkDuplicateLoginReferenceLogin.py
View file @
560ccc5d
from
Products.CMFActivity.ActiveResult
import
ActiveResult
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
ComplexQuery
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
result
=
[]
result
=
[]
sql_result
=
portal
.
ERP5Site_zGetDuplicateLoginReferenceList
()
sql_result
=
portal
.
ERP5Site_zGetDuplicateLoginReferenceList
()
if
len
(
sql_result
):
if
len
(
sql_result
):
from
Products.CMFActivity.ActiveResult
import
ActiveResult
from
Products.ZSQLCatalog.SQLCatalog
import
SimpleQuery
,
ComplexQuery
query
=
ComplexQuery
(
query
=
ComplexQuery
(
*
[
ComplexQuery
(
SimpleQuery
(
portal_type
=
i
[
'portal_type'
]),
*
[
ComplexQuery
(
SimpleQuery
(
portal_type
=
i
[
'portal_type'
]),
SimpleQuery
(
reference
=
i
[
'reference'
]))
for
i
in
sql_result
],
SimpleQuery
(
reference
=
i
[
'reference'
]))
for
i
in
sql_result
],
...
@@ -16,6 +16,13 @@ if len(sql_result):
...
@@ -16,6 +16,13 @@ if len(sql_result):
active_result
.
edit
(
summary
=
'Logins having the same reference exist'
,
active_result
.
edit
(
summary
=
'Logins having the same reference exist'
,
severity
=
len
(
sql_result
),
severity
=
len
(
sql_result
),
detail
=
'
\
n
'
.
join
(
result
))
detail
=
'
\
n
'
.
join
(
result
))
active_process
=
context
.
newActiveProcess
()
elif
context
.
sense
():
active_process
.
postResult
(
active_result
)
active_result
=
ActiveResult
()
return
active_process
active_result
.
edit
(
summary
=
'Logins having the same reference does not exist'
,
severity
=
0
)
else
:
return
active_process
=
context
.
newActiveProcess
()
active_process
.
postResult
(
active_result
)
return
active_process
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