dabo Commit
Revision 6394
Date: 2011-02-06 08:53:56 -0800 (Sun, 06 Feb 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6394
Changed:
U trunk/dabo/ui/dDataControlMixinBase.py
Log:
Fixed an edge case where the value of self.DataField was None.
Diff:
Modified: trunk/dabo/ui/dDataControlMixinBase.py
===================================================================
--- trunk/dabo/ui/dDataControlMixinBase.py 2011-02-06 16:51:05 UTC (rev
6393)
+++ trunk/dabo/ui/dDataControlMixinBase.py 2011-02-06 16:53:56 UTC (rev
6394)
@@ -127,10 +127,11 @@
self._inDataUpdate = False
else:
if self._srcIsInstanceMethod is None and src is not
None:
- if isinstance(src, basestring):
- self._srcIsInstanceMethod = False
- else:
- self._srcIsInstanceMethod =
callable(getattr(src, self.DataField))
+ self._srcIsInstanceMethod = False
+ if not isinstance(src, basestring):
+ att = getattr(src, self.DataField, None)
+ if att is not None:
+ self._srcIsInstanceMethod =
callable(att)
if src is None:
# Could be testing
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]