From 706f8abb281f4cfcfcfd7c14cbb5d5aad9e3c2cf Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Tue, 16 Feb 2021 21:29:38 -0600 Subject: [PATCH] Corrections to translations in MeshFilter. --- openmc/filter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openmc/filter.py b/openmc/filter.py index 02901b9c6..b70d8f74f 100644 --- a/openmc/filter.py +++ b/openmc/filter.py @@ -725,7 +725,6 @@ class MeshFilter(Filter): """ def __init__(self, mesh, filter_id=None, translation=None): - super().__init__(filter_id) self.mesh = mesh self.id = filter_id self._translation = translation @@ -872,8 +871,8 @@ class MeshFilter(Filter): """ element = super().to_xml_element() element[0].text = str(self.mesh.id) - if self.translation: - element.set("translation", ' '.join(map(str, self._translation))) + if self.translation is not None: + element.set('translation', ' '.join(map(str, self._translation))) return element