mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
This reverts4f8c7fd9d9and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report. Backport of5e0aa362d9from main
This commit is contained in:
@@ -164,22 +164,6 @@ class Book(models.Model):
|
||||
base_manager_name = "annotated_objects"
|
||||
|
||||
|
||||
class ConfusedBook(models.Model):
|
||||
title = models.CharField(max_length=50)
|
||||
author = models.CharField(max_length=30)
|
||||
favorite_things = GenericRelation(
|
||||
Person,
|
||||
content_type_field="favorite_thing_type",
|
||||
object_id_field="favorite_thing_id",
|
||||
)
|
||||
less_favorite_things = GenericRelation(
|
||||
FunPerson,
|
||||
content_type_field="favorite_thing_type",
|
||||
object_id_field="favorite_thing_id",
|
||||
related_query_name="favorite_things",
|
||||
)
|
||||
|
||||
|
||||
class FastCarManager(models.Manager):
|
||||
def get_queryset(self):
|
||||
return super().get_queryset().filter(top_speed__gt=150)
|
||||
|
||||
Reference in New Issue
Block a user