From c14e6929528512b7201654d630983f2c219ebc46 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Fri, 17 Feb 2006 18:20:15 +0000 Subject: [PATCH] Fixed #1250 -- Fixed NameError when trying to delete without related object permissions in admin interface. Thanks, oggie rob git-svn-id: http://code.djangoproject.com/svn/django/trunk@2327 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/views/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index e444bedf8e..972388952a 100644 --- a/django/contrib/admin/views/main.py +++ b/django/contrib/admin/views/main.py @@ -600,7 +600,7 @@ def _get_deleted_objects(deleted_objects, perms_needed, user, obj, opts, current if related.opts.admin and has_related_objs: p = '%s.%s' % (related.opts.app_label, related.opts.get_delete_permission()) if not user.has_perm(p): - perms_needed.add(rel_opts.verbose_name) + perms_needed.add(rel_opts_name) for related in opts.get_all_related_many_to_many_objects(): if related.opts in opts_seen: continue