mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-08 11:43:10 +00:00
* sort list of available versions
If `version == 'latest'` then the version is set to `available_versions[-1]` however `available_versions` was not previously sorted so the ordering was the natural order of the `pg_available_extension_versions` view.
* remove unnecessary lambda
* create changelog fragment for #1078
* add PR link to changelog fragment
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
Co-authored-by: Andrew Klychkov <aaklychkov@mail.ru>
(cherry picked from commit 159f38f4f2)
Co-authored-by: Simon Kelly <skelly@dimagi.com>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- postgresql_ext - fix version selection when ``version=latest`` (https://github.com/ansible-collections/community.general/pull/1078).
|
||||
@@ -295,7 +295,7 @@ def ext_get_versions(cursor, ext):
|
||||
if current_version == '0':
|
||||
current_version = False
|
||||
|
||||
return (current_version, available_versions)
|
||||
return (current_version, sorted(available_versions, key=LooseVersion))
|
||||
|
||||
# ===========================================
|
||||
# Module execution.
|
||||
|
||||
Reference in New Issue
Block a user