Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Products.DCWorkflow
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Products.DCWorkflow
Commits
50761e03
Commit
50761e03
authored
Mar 11, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zap string exceptions.
parent
8533ba51
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
Products/DCWorkflow/CHANGES.txt
Products/DCWorkflow/CHANGES.txt
+3
-0
Products/DCWorkflow/ContainerTab.py
Products/DCWorkflow/ContainerTab.py
+3
-2
Products/DCWorkflow/Variables.py
Products/DCWorkflow/Variables.py
+2
-1
No files found.
Products/DCWorkflow/CHANGES.txt
View file @
50761e03
...
...
@@ -4,6 +4,9 @@ Products.DCWorkflow Changelog
2.3.0-alpha (unreleased)
------------------------
- Removed string exceptions.
(https://bugs.launchpad.net/zope-cmf/+bug/952301)
- Made sure converted tools are used as utilities.
- Don't crash worklist's ``manage_main`` if variables are Expression objects.
...
...
Products/DCWorkflow/ContainerTab.py
View file @
50761e03
...
...
@@ -19,6 +19,7 @@ from Acquisition import aq_base
from
Acquisition
import
aq_inner
from
Acquisition
import
aq_parent
from
OFS.Folder
import
Folder
from
zExceptions
import
BadRequest
_marker
=
[]
# Create a new marker object.
...
...
@@ -53,7 +54,7 @@ class ContainerTab(Folder):
def
_checkId
(
self
,
id
,
allow_dup
=
0
):
if
not
allow_dup
:
if
self
.
_mapping
.
has_key
(
id
):
raise
'Bad Request'
,
'The id "%s" is already in use.'
%
id
raise
BadRequest
(
'The id "%s" is already in use.'
%
id
)
return
Folder
.
_checkId
(
self
,
id
,
allow_dup
)
def
_getOb
(
self
,
name
,
default
=
_marker
):
...
...
@@ -111,7 +112,7 @@ class ContainerTab(Folder):
def
manage_renameObjects
(
self
,
ids
=
[],
new_ids
=
[],
REQUEST
=
None
):
"""Rename several sub-objects"""
if
len
(
ids
)
!=
len
(
new_ids
):
raise
'Bad Request'
,
'Please rename each listed object.'
raise
BadRequest
(
'Please rename each listed object.'
)
for
i
in
range
(
len
(
ids
)):
if
ids
[
i
]
!=
new_ids
[
i
]:
self
.
manage_renameObject
(
ids
[
i
],
new_ids
[
i
])
...
...
Products/DCWorkflow/Variables.py
View file @
50761e03
...
...
@@ -21,6 +21,7 @@ from Acquisition import aq_parent
from
App.class_init
import
InitializeClass
from
App.special_dtml
import
DTMLFile
from
OFS.SimpleItem
import
SimpleItem
from
zExceptions
import
BadRequest
from
Products.CMFCore.Expression
import
Expression
from
Products.DCWorkflow.ContainerTab
import
ContainerTab
...
...
@@ -148,7 +149,7 @@ class Variables(ContainerTab):
def
_checkId
(
self
,
id
,
allow_dup
=
0
):
wf_def
=
aq_parent
(
aq_inner
(
self
))
if
id
==
wf_def
.
state_var
:
raise
'Bad Request'
,
'"%s" is used for keeping state.'
%
id
raise
BadRequest
(
'"%s" is used for keeping state.'
%
id
)
return
ContainerTab
.
_checkId
(
self
,
id
,
allow_dup
)
def
getStateVar
(
self
):
...
...
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