Skip to content

Commit

Permalink
[Fixed] Another missing case in the last patch
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Oct 9, 2023
1 parent a20ba7a commit f3ef187
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kibot/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,14 @@ def _set_pcb_layers():
Layer._pcb_layers = {GS.board.GetLayerName(id): id for id in GS.board.GetEnabledLayers().Seq()}

def get_default_suffix(self):
if not isinstance(GS.global_layer_defaults, type):
if GS.global_layer_defaults and not isinstance(GS.global_layer_defaults, type):
layer = next(filter(lambda x: x.layer == self.layer, GS.global_layer_defaults), None)
if layer and layer.suffix:
return layer.suffix
return self.layer.replace('.', '_')

def get_default_description(self):
if not isinstance(GS.global_layer_defaults, type):
if GS.global_layer_defaults and not isinstance(GS.global_layer_defaults, type):
layer = next(filter(lambda x: x.layer == self.layer, GS.global_layer_defaults), None)
if layer and layer.description:
return layer.description
Expand Down

0 comments on commit f3ef187

Please sign in to comment.