Skip to content

Commit

Permalink
change code to reflect passed arguments (#3847)
Browse files Browse the repository at this point in the history
Co-authored-by: Maxime Rey <[email protected]>
Co-authored-by: Samuel Lopez <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2023
1 parent 263ee72 commit 6ddd4b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyaedt/edb_core/edb_data/primitives_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ def layer_name(self):
@layer_name.setter
def layer_name(self, val):
if isinstance(val, str) and val in list(self._core_stackup.layers.keys()):
lay = self._core_stackup.layers["TOP"]._edb_layer
lay = self._core_stackup.layers[val]._edb_layer
if lay:
self.primitive_object.SetLayer(lay)
else:
raise AttributeError("Layer {} not found in layer".format(val))
elif isinstance(val, type(self._core_stackup.layers["TOP"])):
elif isinstance(val, type(self._core_stackup.layers[val])):
try:
self.primitive_object.SetLayer(val._edb_layer)
except:
Expand Down

0 comments on commit 6ddd4b8

Please sign in to comment.