1
0
mirror of https://github.com/django/django.git synced 2025-04-06 14:36:41 +00:00
Michael Sanders 221ef69a9b [2.1.x] Fixed #29499 -- Fixed race condition in QuerySet.update_or_create().
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.

Backport of 271542dad1686c438f658aa6220982495db09797 from master
2018-08-02 17:17:12 -04:00
..
2018-02-02 08:47:32 +01:00
2017-06-01 13:23:48 -04:00

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ pip install -e ..
    $ pip install -r requirements/py3.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.