diff --git a/changelogs/fragments/81504-update-logical-operation.yml b/changelogs/fragments/81504-update-logical-operation.yml new file mode 100644 index 00000000000..51dbefdbc9e --- /dev/null +++ b/changelogs/fragments/81504-update-logical-operation.yml @@ -0,0 +1,2 @@ +bugfixes: + - collection dependency resolver - previous code had the same operand on both sides of a logical expression. Fix now updates the operand in the right side of the logical expression (https://github.com/ansible/ansible/pull/81511). diff --git a/lib/ansible/galaxy/api.py b/lib/ansible/galaxy/api.py index 54384a3b645..d83101330ef 100644 --- a/lib/ansible/galaxy/api.py +++ b/lib/ansible/galaxy/api.py @@ -330,10 +330,7 @@ class GalaxyAPI: if not isinstance(other_galaxy_api, self.__class__): return NotImplemented - return ( - self._priority > other_galaxy_api._priority or - self.name < self.name - ) + return self._priority > other_galaxy_api._priority @property # type: ignore[misc] # https://github.com/python/mypy/issues/1362 @g_connect(['v1', 'v2', 'v3'])