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
3b0feea5
Commit
3b0feea5
authored
Dec 26, 2016
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
External Method: patch so that it raises if a space exists in given id
parent
504ce33f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
product/ERP5Type/patches/ExternalMethod.py
product/ERP5Type/patches/ExternalMethod.py
+8
-0
No files found.
product/ERP5Type/patches/ExternalMethod.py
View file @
3b0feea5
...
...
@@ -23,6 +23,14 @@ class _(PatchClass(ExternalMethod)):
reloadIfChanged
=
getFuncDefaults
=
getFuncCode
=
filepath
=
None
def
__init__
(
self
,
id
,
title
,
module
,
function
):
# START PATCH: do not allow spaces in id
if
' '
in
id
:
raise
ValueError
(
'External Method id cannot contain spaces!'
)
# END PATCH: do not allow spaces in id
self
.
id
=
id
self
.
manage_edit
(
title
,
module
,
function
)
@
property
def
func_defaults
(
self
):
return
self
.
_getFunction
()[
1
]
...
...
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