diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -3834,7 +3834,7 @@ class ChangesetComment(Base, BaseModel): return q.all() @classmethod - def get_index_from_version(cls, pr_version, versions=None, num_versions=None): + def get_index_from_version(cls, pr_version, versions=None, num_versions=None) -> int: if pr_version is None: return 0 @@ -3845,7 +3845,7 @@ class ChangesetComment(Base, BaseModel): try: return num_versions.index(pr_version) + 1 except (IndexError, ValueError): - return + return 0 @property def outdated(self):