Skip to content

Commit 68eb153

Browse files
meshwa19rayabagi
andauthored
Update aws_embedded_metrics/validator.py
Co-authored-by: Amruth Rayabagi <[email protected]>
1 parent 84c4720 commit 68eb153

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws_embedded_metrics/validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def validate_metric(name: str, value: float, unit: Optional[str], storageResolut
8888
raise InvalidMetricError(f"Metric storage Resolution is not valid: {storageResolution}")
8989

9090
if metricNameAndResolutionMap and name in metricNameAndResolutionMap:
91-
if metricNameAndResolutionMap.get(name) is not storageResolution:
91+
if if metricNameAndResolutionMap and name in metricNameAndResolutionMap and metricNameAndResolutionMap.get(name) is not storageResolution :
9292
raise InvalidMetricError(
9393
"Resolution for metrics ${name} is already set. A single log event cannot have a metric with two different resolutions.")
9494

0 commit comments

Comments
 (0)