# HG changeset patch # User RhodeCode Admin # Date 2023-12-01 19:52:11 # Node ID e9dc7693365664a84271e2844e30561ffbd25a2f # Parent 9776fe202764622348fce318342d5a7734bc2f3c fix(comments): fixed outdated comments logic broken by latest changes diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -3851,19 +3851,11 @@ class ChangesetComment(Base, BaseModel): def immutable(self): return self.immutable_state == self.OP_IMMUTABLE - def outdated_at_version(self, version): + def outdated_at_version(self, version: int) -> bool: """ Checks if comment is outdated for given pull request version """ - # If version is None, return False as the current version cannot be less than None - if version is None: - return False - - # Ensure that the version is an integer to prevent TypeError on comparison - if not isinstance(version, int): - raise ValueError("The provided version must be an integer.") - def version_check(): return self.pull_request_version_id and self.pull_request_version_id != version