summaryrefslogtreecommitdiff
path: root/tests/generic_relations_regress
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2023-09-08Fixed #34816 -- Fixed GenericForeignKey crash when checking cache for ↵Oguzhan Akan
primary keys with different types.
2023-04-18Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation ↵David Wobrock
relation on PostgreSQL.
2022-11-18Fixed #26261 -- Fixed queryset crash when excluding reverse GenericRelation.roman_p
Thanks Amir Hadi for the report.
2022-04-21Fixed #33004 -- Made saving objects with unsaved GenericForeignKey raise ↵sarahboyce
ValueError. This aligns to the behaviour of OneToOneField and ForeignKey fields. Thanks Jonny Park for the initial patch.
2022-04-21Refs #13085 -- Removed unnecessary ManyToManyFields from ↵Mariusz Felisiak
generic_relations_regress test models.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-07-08Fixed isolation of GenericRelationTests.test_filter_targets_related_pk().Mariusz Felisiak
2020-11-04Fixed GenericRelationTests.test_annotate when primary key values are large.Tim Graham
On CockroachDB, primary key values stored in this fields are larger than they accept.
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2018-08-10Fixed #29653 -- Fixed missing related_query_name reverse accessor if ↵Ramiro Morales
GenericRelation is declared on an abstract base model. Regression in 4ab027b94409e6415b774797bf9d3593da9d9ea8. Thanks Lauri Kainulainen for the report.
2018-03-20Fixed #29227 -- Allowed BooleanField to be null=True.Tim Graham
Thanks Lynn Cyrin for contributing to the patch, and Nick Pope for review.
2018-03-12Fixed #28988 -- Fixed queries when a GenericRelation is used with ↵robwa
multi-table inheritance.
2017-12-08Refs #28856 -- Added test for caching of a GenericForeignKey pointing to a ↵Morgan Wahl
model that uses more than one level of MTI. Forwardport of test and release notes of 35222035029863f95769e2e59beeeb953d125689 from stable/1.11.x
2017-11-30Fixed #28856 -- Fixed a regression in caching of a GenericForeignKey ↵Simon Charette
pointing to a MTI model. Regression in b9f8635f58ad743995cad2081b3dc395e55761e5.
2017-07-21Fixed #28418 -- Fixed queryset crash when using a GenericRelation to a proxy ↵Rachel Tobin
model.
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-19Refs #23919 -- Removed __nonzero__() methods (for Python 2).Simon Charette
Thanks Tim for the review.
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2016-11-14Fixed #27463 -- Fixed E741 flake8 warnings.Ramin Farajpour Cami
2016-11-14Fixed E305 flake8 warnings.Ramin Farajpour Cami
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-09-13Fixed #27203 -- Replaced assertQuerysetEqual(..., lambda o: o) with ↵Mads Jensen
assertSequenceEqual().
2016-06-28Replaced use of TestCase.fail() with assertRaises().Tim Graham
Also removed try/except/fail antipattern that hides exceptions.
2016-03-28Sorted single letter imports per the latest version of isort.Tim Graham
2016-01-29Refs #26022 -- Used context manager version of assertRaises in tests.Hasan
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-03-25Refs #24267 -- Implemented lookups for related fieldsAnssi Kääriäinen
Previously related fields didn't implement get_lookup, instead related fields were treated specially. This commit removed some of the special handling. In particular, related fields return Lookup instances now, too. Other notable changes in this commit is removal of support for annotations in names_to_path().
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2015-01-06Fixed #12663 -- Formalized the Model._meta API for retrieving fields.Daniel Pyrathon
Thanks to Russell Keith-Magee for mentoring this Google Summer of Code 2014 project and everyone else who helped with the patch!
2014-12-17Fixed #24002 -- GenericRelation filtering targets related model's pkAnssi Kääriäinen
Previously Publisher.objects.filter(book=val) would target book.object_id if book is a GenericRelation. This is inconsistent to filtering over reverse foreign key relations, where the target is the related model's primary key.
2014-12-15Corrected test assertion from refs #21403.Tim Graham
2014-11-03Fixed #23620 -- Used more specific assertions in the Django test suite.Berker Peksag
2014-08-07Fixed #22982 -- Added GenericRelatedObjectManager.__str__. to prevent crash.Jacob Haslehurst
Thanks bendavis78 for the report. Forwardport of 29585e9b6a from stable/1.7.x
2014-07-16PEP8 cleanupAnssi Kääriäinen
2014-07-16Fixed #22998 -- Updated the fast_delete logic for GFKsGavin Wahl
2014-03-05Fixed #22207 -- Added support for GenericRelation reverse lookupsGabe Jackson
GenericRelation now supports an optional related_query_name argument. Setting related_query_name adds a relation from the related object back to the content type for filtering, ordering and other query operations. Thanks to Loic Bistuer for spotting a couple of important issues in his review.
2014-01-26Fixed #19774 -- Deprecated the contenttypes.generic module.Simon Charette
It contained models, forms and admin objects causing undesirable import side effects. Refs #16368. Thanks to Ramiro, Carl and Loïc for the review.
2013-11-25Fixed #21403: Corrected test codeShai Berger
A test for annotations incorrectly assumed that the first instance (in the test) of a model using AutoField for PK will always get pk=1. The test was changed to compare against actual instance id instead.
2013-11-16Fixed #21428 -- editable GenericRelation regressionAnssi Kääriäinen
The GenericRelation refactoring removed GenericRelations from model._meta.many_to_many. This had the side effect of disallowing editable GenericRelations in ModelForms. Editable GenericRelations aren't officially supported, but if we don't fix this we don't offer any upgrade path for those who used the ability to set editable=True in GenericRelation subclass. Thanks to Trac alias joshcartme for the report and stephencmd and Loic for working on this issue.
2013-11-05Fixed #10461 -- bug in generic relation + annotate() caseAnssi Kääriäinen
This issue was fixed when the contenttype restriction was moved from where clause to the join clause. So, this is tests only addition.
2013-11-02PEP8 cleanupJason Myers
Signed-off-by: Jason Myers <jason@jasonamyers.com>
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-06-06Fixed #20564 -- Generic relations exclude() regressionAnssi Kääriäinen
The patch for #19385 caused a regression in certain generic relations .exclude() filters if a subquery was needed. The fix contains a refactoring to how Query.split_exclude() and Query.trim_start() interact. Thanks to Trac alias nferrari for the report.
2013-06-05PEP 8 cleanupAnssi Kääriäinen
2013-05-20Fixed #20378 -- regression in GenericRelation on abstract modelAnssi Kääriäinen
When a GenericRelation was defined on abstract model, queries on childs of the abstract model didn't work. The problem was in the way fields and in particular field.rel was copied from models to their children. The regression was likely caused by #19385. Thanks to Gavin Wahl for spotting the regression.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner