Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1618 closed defect (worksforme)

[patch] Validator for raw_id_admin uses old model API

Reported by: Christopher Lenz <cmlenz@…> Owned by: Adrian Holovaty
Component: Core (Other) Version: magic-removal
Severity: normal Keywords: manipulator_valid_rel_key
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Trivial fix:

Index: django/db/models/fields/
--- django/db/models/fields/  (revision 263)
+++ django/db/models/fields/  (working copy)
@@ -38,7 +38,7 @@
     "Validates that the value is a valid foreign key"
     klass =
-        klass._default_manager.get_object(pk=field_data)
+        klass._default_manager.get(pk=field_data)
     except klass.DoesNotExist:
         raise validators.ValidationError, _("Please enter a valid %s.") % f.verbose_name

Change History (2)

comment:1 Changed 12 years ago by Jacob

Resolution: worksforme
Status: newclosed

I don't actually see this problem in magic-removal head; was it fixed in an earlier commit, perhaps?

comment:2 Changed 12 years ago by Christopher Lenz <cmlenz@…>

Oops, you're right, Adrian fixed that in [2644]. Sorry for the noise.

Note: See TracTickets for help on using tickets.
Back to Top