From 0419cde03da954351db145e48641e30c571137df Mon Sep 17 00:00:00 2001 From: wlockwood Date: Fri, 24 Jan 2025 10:01:18 -0800 Subject: [PATCH] Modify call sign lookup to pick newest license based on unique system identifier. --- packages/uls/src/hamkit/uls/_uls.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/uls/src/hamkit/uls/_uls.py b/packages/uls/src/hamkit/uls/_uls.py index e369cc5..c09a7ac 100644 --- a/packages/uls/src/hamkit/uls/_uls.py +++ b/packages/uls/src/hamkit/uls/_uls.py @@ -82,7 +82,8 @@ def call_sign_lookup(self, call_sign: str) -> UlsRecord | None: Operator_Class, Group_Code, Region_Code - FROM LicenseView WHERE Call_Sign = ?;""", + FROM LicenseView WHERE Call_Sign = ? + ORDER BY Unique_System_Identifier DESC;""", (call_sign.upper().strip(),), ) row = cursor.fetchone()