From 37a084e1d1ef9c4dbb379f67c4c85e9bc841acac Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 20 Nov 2018 13:54:07 +0300 Subject: [PATCH] Fit importing plain modules in command code --- gui/fitCommands/calc/fitImportMutatedModule.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/fitCommands/calc/fitImportMutatedModule.py b/gui/fitCommands/calc/fitImportMutatedModule.py index 426f8245b..3a28c68ea 100644 --- a/gui/fitCommands/calc/fitImportMutatedModule.py +++ b/gui/fitCommands/calc/fitImportMutatedModule.py @@ -30,8 +30,12 @@ class FitImportMutatedCommand(wx.Command): pyfalog.warning("Unable to build non-mutated module: no base item to build from") return False - - mutaplasmid = getDynamicItem(getattr(self.mutaItem, 'ID', None)) + try: + mutaTypeID = self.mutaItem.ID + except AttributeError: + mutaplasmid = None + else: + mutaplasmid = getDynamicItem(mutaTypeID) # Try to build simple item even though no mutaplasmid found if mutaplasmid is None: try: