postgresql_privs - fix sort comparison (#65125)
The result of .sort() is None, not the sorted object. The comparison was comparing the result of the .sort() method and not the sorted values.
This commit is contained in:
parent
6a763d7133
commit
426e37ea92
2 changed files with 5 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- postgresql_privs - sort results before comparing so that the values are compared and not the result of ``.sort()`` (https://github.com/ansible/ansible/pull/65125)
|
|
@ -780,7 +780,9 @@ class Connection(object):
|
||||||
executed_queries.append(query)
|
executed_queries.append(query)
|
||||||
self.cursor.execute(query)
|
self.cursor.execute(query)
|
||||||
status_after = get_status(objs)
|
status_after = get_status(objs)
|
||||||
return status_before.sort() != status_after.sort()
|
status_before.sort()
|
||||||
|
status_after.sort()
|
||||||
|
return status_before != status_after
|
||||||
|
|
||||||
|
|
||||||
class QueryBuilder(object):
|
class QueryBuilder(object):
|
||||||
|
|
Loading…
Reference in a new issue