[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - widget.py:1.18
Albertas Agejevas
alga@codeworks.lt
Fri, 21 Feb 2003 04:46:09 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv16576/app/browser/form
Modified Files:
widget.py
Log Message:
Cosmetic changes.
=== Zope3/src/zope/app/browser/form/widget.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/browser/form/widget.py:1.17 Thu Feb 20 11:46:05 2003
+++ Zope3/src/zope/app/browser/form/widget.py Fri Feb 21 04:46:09 2003
@@ -44,7 +44,7 @@
_missing = None
def haveData(self):
- if (self.name) in self.request.form:
+ if self.name in self.request.form:
return self._convert(self.request[self.name]) is not None
return False
@@ -181,10 +181,10 @@
def haveData(self):
v = self.request.form.get(self.name)
if v is None:
- return 0
+ return False
if not v and getattr(self.context, 'min_length', 1) > 0:
- return 0
- return 1
+ return False
+ return True
def _convert(self, value):
v = self.request.form.get(self.name)