I am trying to use the 7.9 database manipulation delete button in 7.7.8 but I get a “AttributeError: ‘NoneType’ object has no attribute ‘id’” I went into help to see if that was a property in 7.7.8 but could not find it. I search 7.9 and could not find it there either. Is there something special that needs to be done to access this property?
id = event.source.parent.getComponent('Inventory').id if system.gui.confirm("Are you sure you want to delete the selected inventory item?"): system.db.runPrepUpdate("DELETE FROM inventory WHERE id = ?", [id]) system.db.refresh(event.source.parent.getComponent('Inventory'), "data") system.gui.messageBox("Inventory item deleted")