##// END OF EJS Templates
fix(comments): fixed outdated comments logic broken by latest changes
super-admin -
r5220:e9dc7693 default
parent child Browse files
Show More
@@ -3851,19 +3851,11 b' class ChangesetComment(Base, BaseModel):'
3851 def immutable(self):
3851 def immutable(self):
3852 return self.immutable_state == self.OP_IMMUTABLE
3852 return self.immutable_state == self.OP_IMMUTABLE
3853
3853
3854 def outdated_at_version(self, version):
3854 def outdated_at_version(self, version: int) -> bool:
3855 """
3855 """
3856 Checks if comment is outdated for given pull request version
3856 Checks if comment is outdated for given pull request version
3857 """
3857 """
3858
3858
3859 # If version is None, return False as the current version cannot be less than None
3860 if version is None:
3861 return False
3862
3863 # Ensure that the version is an integer to prevent TypeError on comparison
3864 if not isinstance(version, int):
3865 raise ValueError("The provided version must be an integer.")
3866
3867 def version_check():
3859 def version_check():
3868 return self.pull_request_version_id and self.pull_request_version_id != version
3860 return self.pull_request_version_id and self.pull_request_version_id != version
3869
3861
General Comments 0
You need to be logged in to leave comments. Login now