Merge lp:~jtv/maas/quantal-get_db_prep_lookup into lp:maas/trunk

Proposed by Jeroen T. Vermeulen on 2012-09-21
Status: Merged
Approved by: Jeroen T. Vermeulen on 2012-09-21
Approved revision: 1039
Merged at revision: 1039
Proposed branch: lp:~jtv/maas/quantal-get_db_prep_lookup
Merge into: lp:maas/trunk
Diff against target: 19 lines (+3/-2)
1 file modified
src/maasserver/fields.py (+3/-2)
To merge this branch: bzr merge lp:~jtv/maas/quantal-get_db_prep_lookup
Reviewer Review Type Date Requested Status
Julian Edwards (community) 2012-09-21 Approve on 2012-09-21
Review via email: mp+125632@code.launchpad.net

Commit Message

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

Description of the Change

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

Jeroen

To post a comment you must log in.
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/fields.py'
2--- src/maasserver/fields.py 2012-09-18 14:37:28 +0000
3+++ src/maasserver/fields.py 2012-09-21 05:00:25 +0000
4@@ -141,7 +141,7 @@
5 def db_type(self, connection):
6 return "xml"
7
8- def get_db_prep_lookup(self, lookup_type, value):
9+ def get_db_prep_lookup(self, lookup_type, value, **kwargs):
10 """Limit lookup types to those that work on xml.
11
12 Unlike character fields the xml type is non-comparible, see:
13@@ -149,4 +149,5 @@
14 """
15 if lookup_type != 'isnull':
16 raise TypeError("Lookup type %s is not supported." % lookup_type)
17- return super(XMLField, self).get_db_prep_lookup(lookup_type, value)
18+ return super(XMLField, self).get_db_prep_lookup(
19+ lookup_type, value, **kwargs)