[Checkins] SVN: z3c.dobbin/trunk/src/z3c/dobbin/mapper.py Only define checker, if non-trivial.

Malthe Borch mborch at gmail.com
Sun Jun 8 19:29:18 EDT 2008


Log message for revision 87245:
  Only define checker, if non-trivial.

Changed:
  U   z3c.dobbin/trunk/src/z3c/dobbin/mapper.py

-=-
Modified: z3c.dobbin/trunk/src/z3c/dobbin/mapper.py
===================================================================
--- z3c.dobbin/trunk/src/z3c/dobbin/mapper.py	2008-06-08 23:20:17 UTC (rev 87244)
+++ z3c.dobbin/trunk/src/z3c/dobbin/mapper.py	2008-06-08 23:29:17 UTC (rev 87245)
@@ -291,13 +291,13 @@
     # security checker and define it on the mapper
     if interface.interfaces.IInterface.providedBy(spec):
         checker = component.queryAdapter(spec, IChecker)
-        if checker is not None:
-            defineChecker(Mapper, checker)
     # if not, assign the checker from the specification to the mapper.
     else:
         checker = getCheckerForInstancesOf(spec)
+
+    if checker is not None:
         defineChecker(Mapper, checker)
-        
+
     # set class representation method if not defined
     if not isinstance(Mapper.__repr__, types.MethodType):
         def __repr__(self):



More information about the Checkins mailing list