Skip to content

Commit 7332465

Browse files
committed
Fix location of returns
1 parent 90c5557 commit 7332465

File tree

1 file changed

+2
-8
lines changed
  • opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal

1 file changed

+2
-8
lines changed

opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -278,17 +278,14 @@ def collect(
278278
is AggregationTemporality.DELTA
279279
):
280280

281-
if value is None:
282-
return None
283-
284281
previous_collection_start_nano = (
285282
self._previous_collection_start_nano
286283
)
287284
self._previous_collection_start_nano = (
288285
collection_start_nano
289286
)
290287

291-
if current_value is None:
288+
if value is None:
292289
return None
293290

294291
return NumberDataPoint(
@@ -473,17 +470,14 @@ def collect(
473470
is AggregationTemporality.DELTA
474471
):
475472

476-
if value is None:
477-
return None
478-
479473
previous_collection_start_nano = (
480474
self._previous_collection_start_nano
481475
)
482476
self._previous_collection_start_nano = (
483477
collection_start_nano
484478
)
485479

486-
if current_value is None:
480+
if value is None:
487481
return None
488482

489483
return HistogramDataPoint(

0 commit comments

Comments
 (0)