From ae1bcc0efd77d8810eb8acc4be4058848169a965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Blanc?= Date: Sat, 13 Jun 2020 18:34:04 +0200 Subject: [PATCH] Fix issue #19 : check for position is defined when transforming it --- kloppy/domain/services/transformers/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kloppy/domain/services/transformers/__init__.py b/kloppy/domain/services/transformers/__init__.py index 45cecd7f..4d6aaf5a 100644 --- a/kloppy/domain/services/transformers/__init__.py +++ b/kloppy/domain/services/transformers/__init__.py @@ -24,6 +24,8 @@ def __init__(self, def transform_point(self, point: Point, flip: bool) -> Point: # 1. always apply changes from coordinate system # 2. flip coordinates depending on orientation + if point is None: + return None x_base = self._from_pitch_dimensions.x_dim.to_base(point.x) y_base = self._from_pitch_dimensions.y_dim.to_base(point.y)