Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #1403 -- 'Add' green plus sign no longer appears in admin chang…

…e forms for fields whose related models don't have an admin

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b63157c616104d19a92a7b9793693c73e4d047c5 1 parent 374d02e
Adrian Holovaty authored May 26, 2006

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/admin/views/main.py
2  django/contrib/admin/views/main.py
@@ -118,7 +118,7 @@ def __init__(self, field, field_mapping, original):
118 118
         self.raw_id_admin = use_raw_id_admin(field)
119 119
         self.is_date_time = isinstance(field, models.DateTimeField)
120 120
         self.is_file_field = isinstance(field, models.FileField)
121  
-        self.needs_add_label = field.rel and isinstance(field.rel, models.ManyToOneRel) or isinstance(field.rel, models.ManyToManyRel) and field.rel.to._meta.admin
  121
+        self.needs_add_label = field.rel and (isinstance(field.rel, models.ManyToOneRel) or isinstance(field.rel, models.ManyToManyRel)) and field.rel.to._meta.admin
122 122
         self.hidden = isinstance(self.field, models.AutoField)
123 123
         self.first = False
124 124
 

0 notes on commit b63157c

Please sign in to comment.
Something went wrong with that request. Please try again.