fix(comments): fixed outdated comments logic broken by latest changes
This commit is contained in:
parent
7f75e4e70e
commit
83486ed285
1 changed files with 1 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue