[Zope3-checkins] SVN: Zope3/branches/philikon-widget-subdirective/src/zope/app/form/utility.py simplify code

Philipp von Weitershausen philikon at philikon.de
Sun Jun 12 10:17:04 EDT 2005


Log message for revision 30763:
  simplify code
  

Changed:
  U   Zope3/branches/philikon-widget-subdirective/src/zope/app/form/utility.py

-=-
Modified: Zope3/branches/philikon-widget-subdirective/src/zope/app/form/utility.py
===================================================================
--- Zope3/branches/philikon-widget-subdirective/src/zope/app/form/utility.py	2005-06-12 14:15:51 UTC (rev 30762)
+++ Zope3/branches/philikon-widget-subdirective/src/zope/app/form/utility.py	2005-06-12 14:17:04 UTC (rev 30763)
@@ -95,11 +95,10 @@
     if widget is None:
         # does not exist - create it
         widget = _createWidget(context, field, viewType, view.request)
-        setattr(view, widgetName, widget)
     elif IViewFactory.providedBy(widget):
         # exists, but is actually a factory - use it to create the widget
         widget = widget(field.bind(context), view.request)
-        setattr(view, widgetName, widget)
+    setattr(view, widgetName, widget)
         
     # widget must implement IWidget
     if not IWidget.providedBy(widget):



More information about the Zope3-Checkins mailing list