Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Zope
Commits
f3deac93
Commit
f3deac93
authored
Mar 03, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs that caused call to sometimes generate database updates.
parent
8bb5a426
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
lib/python/Products/ExternalMethod/ExternalMethod.py
lib/python/Products/ExternalMethod/ExternalMethod.py
+12
-8
No files found.
lib/python/Products/ExternalMethod/ExternalMethod.py
View file @
f3deac93
...
...
@@ -60,14 +60,14 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit,
self
.
_function
=
function
try
:
del
modules
[
module
]
except
:
pass
self
.
getFunction
()
self
.
getFunction
(
1
)
if
REQUEST
:
return
MessageDialog
(
title
=
'Changed %s'
%
self
.
id
,
message
=
'%s has been updated'
%
self
.
id
,
action
=
REQUEST
[
'URL1'
]
+
'/manage_main'
,
target
=
'manage_main'
)
def
getFunction
(
self
):
def
getFunction
(
self
,
check
=
0
):
module
=
self
.
_module
...
...
@@ -84,6 +84,10 @@ class ExternalMethod(OFS.SimpleItem.Item, Persistent, Explicit,
if
hasattr
(
f
,
'im_func'
):
ff
=
f
.
im_func
else
:
ff
=
f
if
check
:
# Check to make sure function signature is the same.
# Otherwise, we may end up causing an unwanted change.
if
self
.
func_defaults
!=
ff
.
func_defaults
:
self
.
func_defaults
=
ff
.
func_defaults
...
...
@@ -124,4 +128,4 @@ class FuncCode:
def
__cmp__
(
self
,
other
):
return
cmp
((
self
.
co_argcount
,
self
.
co_varnames
),
(
oth
r
.
co_argcount
,
oth
r
.
co_varnames
))
(
oth
er
.
co_argcount
,
othe
r
.
co_varnames
))
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