Commit 7093b5d0 authored by Jim Fulton's avatar Jim Fulton

Changed constructors to tolerate missing REQUEST arguments.

parent 4f5b5c5f
"""Image object"""
__version__='$Revision: 1.36 $'[11:-2]
__version__='$Revision: 1.37 $'[11:-2]
import Globals
from Globals import HTMLFile, MessageDialog
......@@ -17,7 +17,7 @@ def manage_addFile(self,id,file,title='',precondition='',REQUEST=None):
Creates a new file object 'id' with the contents of 'file'"""
self._setObject(id, File(id,title,file,precondition))
return self.manage_main(self,REQUEST)
if REQUEST is not None: return self.manage_main(self,REQUEST)
class File(Persistent,Implicit,RoleManager,Item_w__name__):
......@@ -172,7 +172,7 @@ def manage_addImage(self,id,file,title='',REQUEST=None):
Creates a new Image object 'id' with the contents of 'file'.
"""
self._setObject(id, Image(id,title,file))
return self.manage_main(self,REQUEST)
if REQUEST is not None: return self.manage_main(self,REQUEST)
class Image(File):
"""Principia object for *Images*, can be GIF or JPEG. Has the same
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment