diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py index 0912647a01be66a77f91660a2b8b5ce78241b7c1..12d36179c938ecb3b626c5c34be964b4a55b4349 100644 --- a/src/linkahead/common/models.py +++ b/src/linkahead/common/models.py @@ -506,6 +506,7 @@ class Entity: return self def get_versionid(self): + """Returns the concatenation of ID and version""" return str(self.id)+"@"+str(self.version.id) def get_importance(self, property): # @ReservedAssignment @@ -2131,9 +2132,11 @@ class Property(Entity): def value_matches_versionid(self): + """Returns True if the value matches the pattern <id>@<version>""" return value_matches_versionid(self.value) def get_id_from_versionid_value(self): + """Returns the ID part of the versionid with the pattern <id>@<version>""" return get_id_from_versionid(self.value) class Message(object): @@ -5682,6 +5685,7 @@ def _filter_entity_list_by_identity(listobject: list[Entity], return matches def value_matches_versionid(value: Union[int, str]): + """Returns True if the value matches the pattern <id>@<version>""" if isinstance(value, int): return False if not isinstance(value, str): @@ -5690,4 +5694,5 @@ def value_matches_versionid(value: Union[int, str]): return "@" in value def get_id_from_versionid(versionid: str): + """Returns the ID part of the versionid with the pattern <id>@<version>""" return versionid.split("@")[0]