Changeset 2289 for WAeUP_SRP/base/Widgets.py
- Timestamp:
- 28 Sep 2007, 08:54:17 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/Widgets.py
r2282 r2289 624 624 def validate(self, datastructure, **kw): 625 625 """Validate datastructure and update datamodel.""" 626 626 mode = kw.get('mode','create') 627 627 valid = CPSStringWidget.validate(self, datastructure, **kw) 628 628 id_pat_str = r"\S" … … 642 642 if len(value.split()) > 1: 643 643 err = 'Invalid Id, Id contains space(s).' 644 elif self.portal_catalog(portal_type=portal_type_query,id=value): 644 elif mode == "create" and\ 645 self.portal_catalog(portal_type=portal_type_query,id=value): 645 646 brain = self.portal_catalog(portal_type=portal_type_query,id=value)[0] 646 647 err = 'An ${portal_type} object with the Id ${id} already exists at ${path}.'
Note: See TracChangeset for help on using the changeset viewer.