|
@@ -283,10 +283,12 @@ class AdmRepository(
|
|
|
val projects = frame.projects
|
|
|
val objects = frame.buildingsAndFloors
|
|
|
try {
|
|
|
- db.projectDao().insProject(projects)
|
|
|
+ if (projects != null) {
|
|
|
+ db.projectDao().insProject(projects)
|
|
|
+ }
|
|
|
objects.forEach { it.state = 2 }.let { db.objectDao().insObjects(objects) }
|
|
|
} catch (e: Exception) {
|
|
|
- Log.d("IRepository:${AdmRepository::class.simpleName}", e.message!!)
|
|
|
+ Log.d("IRepository:${AdmRepository::class.simpleName}", "$e")
|
|
|
}
|
|
|
},
|
|
|
error = {
|