mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-09-17 00:26:26 +00:00
Fix salary tool edge cases (#75)
* fix: handle salary tool edge cases * fix: preserve Danish salary compounds
This commit is contained in:
+5
-2
@@ -204,12 +204,15 @@ def format_entry(entry, metadata):
|
||||
count = data.get("count")
|
||||
index = data.get("index")
|
||||
if count is not None or index is not None:
|
||||
count_str = str(count) if count else "-"
|
||||
if index is not None:
|
||||
count_str = str(count) if count is not None else "-"
|
||||
if isinstance(index, (int, float)):
|
||||
diff = index - baseline
|
||||
sign = "+" if diff >= 0 else ""
|
||||
index_str = f"{index:.1f}"
|
||||
diff_str = f"{sign}{diff:.1f}%"
|
||||
elif index is not None:
|
||||
index_str = str(index)
|
||||
diff_str = ""
|
||||
else:
|
||||
index_str = "N/A*"
|
||||
diff_str = ""
|
||||
|
||||
Reference in New Issue
Block a user