Skip to content

Commit 2425051

Browse files
committed
Fix: make valid
Signed-off-by: Rejwanul Hoque <hoquerejwanulrh@gmail.com>
1 parent e7f441f commit 2425051

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packagedb/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def sort_version(packages, package_type=None):
7070
version_class = range_class.version_class
7171
try:
7272
return sorted(packages, key=lambda p: version_class(p.version))
73-
except Exception:
73+
except Exception as e:
7474
# Fallback to natural sort if version parsing fails
75-
pass
75+
logger.warning(f"Failed to sort versions using {pkg_type} version class: {e}")
7676

7777
# Fallback to natural sorting
7878
return natsort.natsorted(packages, key=lambda p: p.version)

0 commit comments

Comments
 (0)