← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/quantal-get_db_prep_lookup into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/quantal-get_db_prep_lookup into lp:maas.

Commit message:
Fix up XMLField.get_db_prep_lookup for Quantal: the new Django calls it with some additional keyword arguments.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~jtv/maas/quantal-get_db_prep_lookup/+merge/125632

Discussed (briefly) with Julian.  Fixes the top error on this Quantal run: http://paste.ubuntu.com/1218063/


Jeroen
-- 
https://code.launchpad.net/~jtv/maas/quantal-get_db_prep_lookup/+merge/125632
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/quantal-get_db_prep_lookup into lp:maas.
=== modified file 'src/maasserver/fields.py'
--- src/maasserver/fields.py	2012-09-18 14:37:28 +0000
+++ src/maasserver/fields.py	2012-09-21 05:00:25 +0000
@@ -141,7 +141,7 @@
     def db_type(self, connection):
         return "xml"
 
-    def get_db_prep_lookup(self, lookup_type, value):
+    def get_db_prep_lookup(self, lookup_type, value, **kwargs):
         """Limit lookup types to those that work on xml.
 
         Unlike character fields the xml type is non-comparible, see:
@@ -149,4 +149,5 @@
         """
         if lookup_type != 'isnull':
             raise TypeError("Lookup type %s is not supported." % lookup_type)
-        return super(XMLField, self).get_db_prep_lookup(lookup_type, value)
+        return super(XMLField, self).get_db_prep_lookup(
+            lookup_type, value, **kwargs)