Concurrency control in Django model

Viewed 17003

How do I handle concurrency in a Django model? I don't want the changes to the record being overwritten by another user who reads the same record.

3 Answers

I don't think that 'keeping a version number or timestamp' works.

When self.version == self.read_current_version() is True, there is still a chance that the version number got modified by other sessions just before you call super().save().

Related