def create(self): asset_name = str(self.tName.text()) attris = {} attris['type'] = str(self.tType.currentText()) attris['level'] = str(self.tLevel.currentText()) MAsset.createAssetGroup(asset_name, attris) self.tName.setText('') return True
def create(self): asset_name = str(self.tName.text()) if not asset_name: return False attris = {} attris['type'] = str(self.tType.currentText()) if self.LH.isChecked(): attris['level'] = 'Height' MAsset.createAssetGroup(asset_name, attris) if self.LM.isChecked(): attris['level'] = 'Middle' MAsset.createAssetGroup(asset_name, attris) if self.LL.isChecked(): attris['level'] = 'Low' MAsset.createAssetGroup(asset_name, attris) return True