fix dashboard parser source counts
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Drop and Recreate Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 1m12s
CI/CD Pipeline / Build and Push Images (push) Successful in 5m23s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
All checks were successful
CI/CD Pipeline / Manual Action Help (push) Has been skipped
CI/CD Pipeline / Start Dev Containers in Dokploy (push) Has been skipped
CI/CD Pipeline / Drop and Recreate Dev Database (push) Has been skipped
CI/CD Pipeline / Quality Gate (push) Successful in 1m12s
CI/CD Pipeline / Build and Push Images (push) Successful in 5m23s
CI/CD Pipeline / Internal Notify (push) Successful in 1s
CI/CD Pipeline / Deploy Dev in Dokploy (push) Successful in 1s
This commit is contained in:
@@ -2070,7 +2070,8 @@ class ParserDashboardDataView(APIView):
|
||||
file_sources = [source for source in sources if source["supports_file_upload"]]
|
||||
jobs = BackgroundJobService.get_user_jobs(user_id=request.user.id, limit=30)
|
||||
source_counts = dict(
|
||||
GenericParserRecord.objects.values("source")
|
||||
GenericParserRecord.objects.order_by()
|
||||
.values("source")
|
||||
.annotate(count=Count("id"))
|
||||
.values_list("source", "count")
|
||||
)
|
||||
@@ -2080,6 +2081,9 @@ class ParserDashboardDataView(APIView):
|
||||
for source, model in NATIVE_RECORD_MODELS.items()
|
||||
}
|
||||
)
|
||||
source_counts.update(
|
||||
{ParserLoadLog.Source.FNS_REPORTS: FinancialReport.objects.count()}
|
||||
)
|
||||
schedules = [
|
||||
_periodic_task_to_dict(task)
|
||||
for task in _parser_periodic_tasks_for_user(request.user)
|
||||
|
||||
Reference in New Issue
Block a user