Changeset 4178 for waeup/branches/ulif-rewrite/src
- Timestamp:
- 27 May 2009, 08:41:35 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup/branches/ulif-rewrite/src/waeup/viewlets.py
r4168 r4178 77 77 78 78 def update(self, csvfile=None, clear=None, overwrite=None, 79 CANCEL=None, SUBMIT=None):79 receiverid=None, CANCEL=None, SUBMIT=None): 80 80 if CANCEL is not None: 81 81 self.redirect(self.url(self.context)) … … 83 83 if not csvfile: 84 84 return 85 importer = IWAeUPXMLImporter(self.context) 86 obj = importer.doImport(xmlfile) 87 if type(obj) != type(self.context): 88 return 89 parent = self.context.__parent__ 90 name = self.context.__name__ 91 self.context = obj 92 if hasattr(parent, name): 93 setattr(parent, name, obj) 94 else: 95 del parent[name] 96 parent[name] = obj 97 pass 85 if not SUBMIT: 86 return 87 receivers = self.context.getReceiverIds() 88 if receiverid not in receivers.keys(): 89 return 90 receiver = receivers[receiverid] 91 from waeup.interfaces import IWAeUPCSVImporter 92 importer = IWAeUPCSVImporter(receiver) 93 importer.doImport(csvfile) 98 94 return 99 95
Note: See TracChangeset for help on using the changeset viewer.