Fix domain reports and sources API 500 errors
- Use begin_timestamp/end_timestamp (Unix ints) instead of begin_date/end_date (ISO strings) when building ReportEntry, fixing Pydantic int_parsing errors - Extract policy string from dict (policy["p"]) when the stored value is a dict, fixing Pydantic string_type validation error - Rename _days -> days in ReportStore.get_domain_sources() so the endpoint's `days=days` keyword call no longer raises TypeError Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/15ac3521-e81f-42fa-81a2-f6804a423e1d Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -177,7 +177,7 @@ class ReportStore:
|
||||
return sorted_reports[:limit]
|
||||
return sorted_reports
|
||||
|
||||
def get_domain_sources(self, domain: str, _days: int = 30) -> List[Dict[str, Any]]:
|
||||
def get_domain_sources(self, domain: str, days: int = 30) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
Get sending sources for a domain
|
||||
|
||||
|
||||
Reference in New Issue
Block a user