Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1760 | fixing monthly report mapping count
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Feb 7, 2024
1 parent ecc2f5e commit 44e9398
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/mappings/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ def grouped_queryset(self):
count = queryset.filter(to_source_id=to_source_id).count()
internal_count = queryset.filter(
to_source_id=to_source_id,
from_source_id=F('from_source_id'),
parent_id=F('parent_id')
from_source_id=to_source_id,
parent_id=to_source_id
).count()
between_sources_count = count - internal_count
result.append([source.uri, count, internal_count, between_sources_count])

return result
return sorted(result, lambda x: x[1], reverse=True)

@staticmethod
def to_grouped_stat_csv_row(obj):
Expand Down

0 comments on commit 44e9398

Please sign in to comment.