Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a small initialisation edge-case in the raw_id_fields section o…

…f admin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8951 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 559c0da7c141488e5d7c6bc0ef54f27dca53ca42 1 parent d7e37b6
@malcolmt malcolmt authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  django/contrib/admin/widgets.py
View
2  django/contrib/admin/widgets.py
@@ -105,6 +105,8 @@ def __init__(self, rel, attrs=None):
super(ForeignKeyRawIdWidget, self).__init__(attrs)
def render(self, name, value, attrs=None):
+ if attrs is None:
+ attrs = {}
related_url = '../../../%s/%s/' % (self.rel.to._meta.app_label, self.rel.to._meta.object_name.lower())
params = self.url_parameters()
if params:
Please sign in to comment.
Something went wrong with that request. Please try again.