From f9c8eeb31133d3bf55ae167168fcb2d90ce4d12a Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 4 Mar 2009 07:21:14 +0000 Subject: Fixed #10406 -- Fixed some problems with model inheritance and pk fields. Manually specifying both a OneToOneField(parent_link=True) and separate a primary key field was causing invalid SQL to be generated. Thanks to Ramiro Morales for some analysis on this one. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9971 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/base.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'django') diff --git a/django/db/models/base.py b/django/db/models/base.py index ad7c97359e..c7445672ee 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -98,8 +98,6 @@ class ModelBase(type): # Concrete classes... if base in o2o_map: field = o2o_map[base] - field.primary_key = True - new_class._meta.setup_pk(field) else: attr_name = '%s_ptr' % base._meta.module_name field = OneToOneField(base, name=attr_name, -- cgit v1.3