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
Georgios Dagkakis
erp5
Commits
504ce33f
Commit
504ce33f
authored
Dec 26, 2016
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PythonScript: patch so that it raises if a space exists in given id
parent
ae932987
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
product/ERP5Type/patches/PythonScript.py
product/ERP5Type/patches/PythonScript.py
+10
-0
No files found.
product/ERP5Type/patches/PythonScript.py
View file @
504ce33f
...
...
@@ -22,6 +22,7 @@ from OFS.misc_ import p_
from
App.ImageFile
import
ImageFile
from
Acquisition
import
aq_base
,
aq_parent
from
zExceptions
import
Forbidden
from
Shared.DC.Scripts.Script
import
defaultBindings
### Guards
...
...
@@ -151,6 +152,15 @@ class _(PatchClass(PythonScript)):
security
=
ClassSecurityInfo
()
def
__init__
(
self
,
id
):
# START PATCH: do not allow spaces in id
if
' '
in
id
:
raise
ValueError
(
'PythonScript id cannot contain spaces!'
)
# END PATCH: do not allow spaces in id
self
.
id
=
id
self
.
ZBindings_edit
(
defaultBindings
)
self
.
_makeFunction
()
# Add proxy role icon in ZMI
def
om_icons
(
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