Re: Retrieving objects created in trasaction

2017-09-11 Thread Александр Христюхин (roboslone)
Thanks to everyone and sorry for the delay, I've missed your responses. I've tried to use transaction.on_commit, it didn't work for me. For some strange reason Django thought the code wasn't running in a transaction. I'm using Django 1.10 and PostgreSQL 9.6. Bar uses standard manager and yes, I

Re: Retrieving objects created in trasaction

2017-08-24 Thread Daniel Hepper
I cannot reproduce this behavior with Django 1.11 and PostgreSQL 9.6. What database are you using? Does your Bar model maybe use non-standard Manager? Can you actually fetch to objects after the transaction has finished? On Wednesday, August 16, 2017 at 8:29:09 PM UTC+2, Александр Христюхин

Re: Retrieving objects created in trasaction

2017-08-24 Thread Christian Ledermann
On 16 August 2017 at 19:27, roboslone - wrote: > Hi, > > I have some function (fetcher) that runs in transaction (it has to) and it > creates a bunch if new objects that are written to database after transaction > is commited. Those objects are added to a many-to-many

Re: Retrieving objects created in trasaction

2017-08-23 Thread James Schneider
On Aug 16, 2017 11:27 AM, "roboslone -" wrote: Hi, I have some function (fetcher) that runs in transaction (it has to) and it creates a bunch if new objects that are written to database after transaction is commited. Those objects are added to a many-to-many relation. And

Re: Retrieving objects created in trasaction

2017-08-23 Thread pieceofkayk2718
Try foo.save() before foo.bars.add(). > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group,

Retrieving objects created in trasaction

2017-08-16 Thread roboslone -
Hi, I have some function (fetcher) that runs in transaction (it has to) and it creates a bunch if new objects that are written to database after transaction is commited. Those objects are added to a many-to-many relation. And on that relation change a signal is fired and handled by my signal