This is a bug that was introduced by theodore.therone@gmail.com https://github.com/jedie/django-reversion-compare/commit/9c81a09f37ebc29207145a6c461afbd5612a835c The error is: local variable 'version' referenced before assignment The variable `version` is used before it is assigned anything leading to the error.