HOTFIX: Version string broken on paperwork generation

Why the hell didn't the tests catch that?
This commit is contained in:
2022-01-25 12:30:37 +00:00
parent 7bc47b446c
commit 15ab626593
3 changed files with 9 additions and 5 deletions

View File

@@ -9,12 +9,12 @@ from reversion.models import Version, VersionQuerySet
class RevisionMixin:
@property
def is_first_version(self):
versions = Version.objects.get_for_object(self)
versions = RIGSVersion.objects.get_for_object(self)
return len(versions) == 1
@property
def current_version(self):
version = Version.objects.get_for_object(self).select_related('revision').first()
version = RIGSVersion.objects.get_for_object(self).select_related('revision').first()
return version
@property