Skip to content

Commit

Permalink
Calculo indicadores con error de distribuciones y series
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslavandeira committed Jul 24, 2018
1 parent cd74fbb commit 72185da
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ def calculate_distribution_indicators(self, node, data_json):
previous = not_indexable.filter(new=False, present=True).count()
self.create(type=Indicator.DISTRIBUTION_NOT_INDEXABLE_PREVIOUS, value=previous, node=node)

error = Distribution.objects.filter(dataset__catalog=catalog, error=True).count()
self.create(type=Indicator.DISTRIBUTION_ERROR, value=error, node=node)

not_indexable_discontinued = not_indexable.filter(present=False).count()
self.create(type=Indicator.DISTRIBUTION_NOT_INDEXABLE_DISCONTINUED,
value=not_indexable_discontinued,
Expand Down Expand Up @@ -152,6 +155,9 @@ def calculate_series_indicators(self, node, data_json):
previous = not_indexable.filter(new=False, present=True).count()
self.create(type=Indicator.FIELD_NOT_INDEXABLE_PREVIOUS, value=previous, node=node)

error = Field.objects.filter(distribution__dataset__catalog=catalog, error=True).count()
self.create(type=Indicator.FIELD_ERROR, value=error, node=node)

not_indexable_discontinued = not_indexable.filter(present=False).count()
self.create(type=Indicator.FIELD_NOT_INDEXABLE_DISCONTINUED,
value=not_indexable_discontinued,
Expand Down

0 comments on commit 72185da

Please sign in to comment.