summaryrefslogtreecommitdiff
path: root/tests/get_or_create/models.py
AgeCommit message (Collapse)Author
2023-02-14Fixed #34280 -- Allowed specifying different field values for create ↵tschilling
operation in QuerySet.update_or_create().
2022-09-30Fixed #32095 -- Made QuerySet.update_or_create() save only fields passed in ↵sarahboyce
defaults or with custom pre_save(). Thanks Florian Apolloner for the initial patch.
2022-09-27Added tests for QuerySet.update_or_create() with multi-table inheritance.sarahboyce
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-04-30Removed unused __str__() methods in tests models.Mariusz Felisiak
Follow up to 6461583b6cc257d25880ef9a9fd7e2125ac53ce1.
2018-08-02Fixed #29499 -- Fixed race condition in QuerySet.update_or_create().Michael Sanders
A race condition happened when the object didn't already exist and another process/thread created the object before update_or_create() did and then attempted to update the object, also before update_or_create() saved the object. The update by the other process/thread could be lost.
2017-05-27Fixed #28222 -- Allowed settable properties in ↵Alex
QuerySet.update_or_create()/get_or_create() defaults.
2017-05-10Decreased max_length for char fields unless absolutely needed. (#8485)Florian Apolloner
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2017-01-18Refs #23919 -- Removed encoding preambles and future importsClaude Paroz
2015-07-27Fixed #21127 -- Started deprecation toward requiring on_delete for ↵Flavio Curella
ForeignKey/OneToOneField
2015-06-05Refs #22728 - Added missing tests for defaults__exact caseAndriy Sokolovskiy
2014-04-21Consolidated get_or_create tests.Aymeric Augustin
2013-05-27Fixed #16137 - Removed kwargs requirement for QuerySet.get_or_createTim Graham
Thanks wilfred@, poirier, and charettes for work on the patch.
2013-05-19Lower the max length for a test field so that it works on MySQL.Alex Gaynor
2013-05-19Fixes #18896. Add tests verifying that you can get IntegrityErrors using ↵Pablo Recio
get_or_create through relations like M2M, and it also adds a note into the documentation warning about it
2013-04-28Tested that get_or_create raises IntegrityError.Aymeric Augustin
It used to raise "DatabaseError: no such savepoint" with the old transaction management. Closes #15117.
2013-02-26Merged regressiontests and modeltests into the test root.Florian Apolloner