fix: Quellenlinks bei String-Nr repariert (574, 610, 611, 617 etc.)
Ursache: Claude liefert teilweise Quellennummern als String statt Integer. Der Frontend-Vergleich (===) schlug dann fehl: "574" !== 574. Fixes: - 95 String-Nummern in Irankonflikt sources_json zu Integer konvertiert - 5 Duplikate entfernt - Frontend: Number() statt parseInt/=== fuer robusten Vergleich - Orchestrator: Automatische Konvertierung von String-Nr zu Integer vor DB-Speicherung - Cache-Buster aktualisiert Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dieser Commit ist enthalten in:
@@ -999,6 +999,15 @@ class AgentOrchestrator:
|
||||
logger.info("Platzhalter fuer fehlende Quelle [%d] eingefuegt", nr)
|
||||
sources.sort(key=lambda s: int(s.get("nr", 0)) if isinstance(s.get("nr"), int) or (isinstance(s.get("nr"), str) and str(s.get("nr", "")).isdigit()) else 9999)
|
||||
|
||||
# Sicherstellen dass alle nr-Werte Integer sind (Claude liefert manchmal Strings)
|
||||
if sources:
|
||||
for s in sources:
|
||||
nr = s.get("nr")
|
||||
if isinstance(nr, str):
|
||||
try:
|
||||
s["nr"] = int(nr)
|
||||
except ValueError:
|
||||
pass
|
||||
sources_json = json.dumps(sources, ensure_ascii=False) if sources else previous_sources_json
|
||||
|
||||
await db.execute(
|
||||
|
||||
@@ -751,7 +751,7 @@
|
||||
<script src="/static/vendor/leaflet.markercluster.js"></script>
|
||||
<script src="/static/js/api.js?v=20260316b"></script>
|
||||
<script src="/static/js/ws.js?v=20260316b"></script>
|
||||
<script src="/static/js/components.js?v=20260316b"></script>
|
||||
<script src="/static/js/components.js?v=20260316c"></script>
|
||||
<script src="/static/js/layout.js?v=20260316b"></script>
|
||||
<script src="/static/js/app.js?v=20260316b"></script>
|
||||
<script src="/static/js/api_network.js?v=20260316a"></script>
|
||||
|
||||
@@ -447,7 +447,7 @@ const UI = {
|
||||
// Inline-Zitate [1], [2] etc. als klickbare Links rendern
|
||||
if (sources.length > 0) {
|
||||
html = html.replace(/\[(\d+)\]/g, (match, num) => {
|
||||
const src = sources.find(s => s.nr === parseInt(num));
|
||||
const src = sources.find(s => Number(s.nr) === Number(num));
|
||||
if (src && src.url) {
|
||||
return `<a href="${this.escape(src.url)}" target="_blank" rel="noopener" class="citation" title="${this.escape(src.name)}">[${num}]</a>`;
|
||||
}
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren