Refactoring for version_lock attribute