Spaces:
Sleeping
Sleeping
Upload 3 files
Browse files- edgar_client.py +12 -12
edgar_client.py
CHANGED
|
@@ -892,18 +892,18 @@ class EdgarDataClient:
|
|
| 892 |
"start": matched_entry.get("start", ""),
|
| 893 |
"end": matched_entry.get("end", "")
|
| 894 |
}
|
| 895 |
-
|
| 896 |
-
|
| 897 |
-
|
| 898 |
-
|
| 899 |
-
|
| 900 |
-
|
| 901 |
-
|
| 902 |
-
|
| 903 |
-
|
| 904 |
-
|
| 905 |
-
|
| 906 |
-
|
| 907 |
|
| 908 |
# Simplified details: only metric-specific info (tag and val)
|
| 909 |
# All common fields (form, fy, fp, accn, filed, frame, data_source, start, end)
|
|
|
|
| 892 |
"start": matched_entry.get("start", ""),
|
| 893 |
"end": matched_entry.get("end", "")
|
| 894 |
}
|
| 895 |
+
else:
|
| 896 |
+
# Only add per-metric source if it differs from primary
|
| 897 |
+
primary_src = result["meta"]["primary_source"]
|
| 898 |
+
if (url != primary_src.get("url") or
|
| 899 |
+
form_type != primary_src.get("form") or
|
| 900 |
+
data_source != primary_src.get("data_source")):
|
| 901 |
+
result["sources"][metric_key] = {
|
| 902 |
+
"url": url,
|
| 903 |
+
"form": form_type,
|
| 904 |
+
"data_source": data_source,
|
| 905 |
+
"filed": matched_entry.get("filed", "")
|
| 906 |
+
}
|
| 907 |
|
| 908 |
# Simplified details: only metric-specific info (tag and val)
|
| 909 |
# All common fields (form, fy, fp, accn, filed, frame, data_source, start, end)
|