Django 2.0 beta 1 released

2017-10-16 Thread Tim Graham
We've made the second release on the way to Django's next major release, Django 2.0! With a month and a half until the final release, we'll need timely testing from the community to ensure a stable release. Check out the blog post: https://www.djangoproject.com/weblog/2017/oct/16/django-20-beta-1-

Re: non-concurrent QuerySet.get_or_create() on Postgresql

2017-10-16 Thread Ran Benita
The code tries to handle a scenario like the following (of course, the statements can be relatively ordered in different ways). Can you describe how the scenario which fails for you looks like? I am assuming you are using READ COMMITTED, and that the lookup fields are unique together. THREAD1

Re: non-concurrent QuerySet.get_or_create() on Postgresql

2017-10-16 Thread Дилян Палаузов
Hello The problem was, that get_or_create() was called within a transaction and at the end of the transaction the INSERT caused IntegrityError, as in the meantime another transaction has finished, that inserted the same row but with a different id. I have wrongly concluded, that repeating get