Strange behavior, that I don\'t know how to explain. I\'ve got a model, Track
, with some related points
. I call a celery task to performs some calculat
I'm going to assume this is due to transaction isolation.
Django transactions by default are tied to requests; and while a transaction is active, no other process will see the changes until the transaction is committed. If you're in the middle of a save method, and there are quite a lot of other actions that take place before the request finishes, it seems likely that Celery starts processing the task before the transaction is committed. You could fix this by committing manually or by delaying the task.