diff --git a/src/django_handleref/models.py b/src/django_handleref/models.py index 690db3b..6215639 100644 --- a/src/django_handleref/models.py +++ b/src/django_handleref/models.py @@ -8,9 +8,10 @@ def handle_version(**kwargs): for vs in kwargs.get("versions"): - instance = vs.object - instance.version = instance.version + 1 - instance.save() + if isinstance(vs.object, HandleRefModel): + instance = vs.object + instance.version = instance.version + 1 + instance.save() reversion.signals.post_revision_commit.connect(handle_version) except ImportError: