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.
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.
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().