Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Added field to test model to cause failure on PostgreSQL

Create a test that illustrates #12728.

This is a bug that manifests when there's a generic relation to
a model that uses multi-table inheritence, with PostgreSQL as the
back-end.
  • Loading branch information...
commit 41c0a33bdabd567159da96626a6e5373691cacca 1 parent 0f69a16
Lorin Hochstein authored July 30, 2012

Showing 1 changed file with 6 additions and 0 deletions. Show diff stats Hide diff stats

  1. 6  tests/regressiontests/backends/models.py
6  tests/regressiontests/backends/models.py
... ...
@@ -1,3 +1,4 @@
  1
+from django.contrib.comments.models import Comment
1 2
 from django.contrib.contenttypes import generic
2 3
 from django.contrib.contenttypes.models import ContentType
3 4
 from django.db import models, connection
@@ -44,10 +45,15 @@ class Tag(models.Model):
44 45
     content_object = generic.GenericForeignKey('content_type', 'object_id')
45 46
 
46 47
 
  48
+class PossibleSelfComment(Comment):
  49
+    by_author = models.BooleanField(default=False)
  50
+
  51
+
47 52
 class Post(models.Model):
48 53
     name = models.CharField(max_length=30)
49 54
     text = models.TextField()
50 55
     tags = generic.GenericRelation('Tag')
  56
+    comments = generic.GenericRelation('PossibleSelfComment')
51 57
 
52 58
     class Meta:
53 59
         db_table = 'CaseSensitive_Post'

0 notes on commit 41c0a33

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