(self)
Update asset data in DB according to Asset Properties widget.
Update asset data in DB according to Asset Properties widget.
Update asset data in DB according to Asset Properties widget .
def update_asset(self):
        """
        Update asset data in DB according to Asset Properties widget.
        """

        print '>> Updating asset...'

        # Get asset
        asset = self.selected_asset

        # Modify asset data
        asset_type_index = self.asset_properties_ui.asset_ui.comAssetType.model().index(
                                                    self.asset_properties_ui.asset_ui.comAssetType.currentIndex(), 0)
        asset_type_id = asset_type_index.data(QtCore.Qt.UserRole + 1)

        asset.type = asset_type_id
        asset.description = self.asset_properties_ui.asset_ui.txtDescription.toPlainText()

        # Save asset data
        self.eve_data.update_asset(asset)

        print '>> Asset "{}" updated!'.format(asset.name)
def update_asset ( self ) : print '>> Updating asset...' # Get asset asset = self . selected_asset # Modify asset data asset_type_index = self . asset_properties_ui . asset_ui . comAssetType . model ( ) . index ( self . asset_properties_ui . asset_ui . comAssetType . currentIndex ( ) , 0 ) asset_type_id = asset_type_index . data ( QtCore . Qt . UserRole + 1 ) asset . type = asset_type_id asset . description = self . asset_properties_ui . asset_ui . txtDescription . toPlainText ( ) # Save asset data self . eve_data . update_asset ( asset ) print '>> Asset "{}" updated!' . format ( asset . name )