Use findDevice() instead of getDevice() when you want to delete it
This commit is contained in:
parent
1fd6b59bf8
commit
f44974c215
|
@ -377,7 +377,7 @@ public class ControlCenter extends GBActivity {
|
||||||
}
|
}
|
||||||
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
try (DBHandler dbHandler = GBApplication.acquireDB()) {
|
||||||
DaoSession session = dbHandler.getDaoSession();
|
DaoSession session = dbHandler.getDaoSession();
|
||||||
Device device = DBHelper.getDevice(gbDevice, session);
|
Device device = DBHelper.findDevice(gbDevice, session);
|
||||||
if (device != null) {
|
if (device != null) {
|
||||||
long deviceId = device.getId();
|
long deviceId = device.getId();
|
||||||
QueryBuilder qb;
|
QueryBuilder qb;
|
||||||
|
|
Loading…
Reference in New Issue