From af7773f2800961c7a9628a3f8997e2e7ed81a7dd Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 29 Jul 2008 05:17:47 +0000 Subject: [PATCH] Fixed #8011 -- Be careful not to evalute lazy-translated Meta.verbose_name values whilst importing models. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8132 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/fields/related.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py index ca25df2503..cb86f00c86 100644 --- a/django/db/models/fields/related.py +++ b/django/db/models/fields/related.py @@ -114,7 +114,8 @@ class RelatedField(object): def set_attributes_from_rel(self): self.name = self.name or (self.rel.to._meta.object_name.lower() + '_' + self.rel.to._meta.pk.name) - self.verbose_name = self.verbose_name or self.rel.to._meta.verbose_name + if self.verbose_name is None: + self.verbose_name = self.rel.to._meta.verbose_name self.rel.field_name = self.rel.field_name or self.rel.to._meta.pk.name def do_related_class(self, other, cls):