mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02: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:
parent
2cb3cec659
commit
ee8f87412a
2 changed files with 3 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue