diff --git a/.travis.yml b/.travis.yml index 56c64858..b3261931 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,10 +11,10 @@ cache: - $HOME/.gradle/caches/ - $HOME/.gradle/wrapper/ -#branches: -# only: -# - master -# - 0.7.x +branches: + only: + - master + - 0.7.x android: licenses: diff --git a/app/src/main/java/io/github/wulkanowy/data/db/dao/StudentDao.kt b/app/src/main/java/io/github/wulkanowy/data/db/dao/StudentDao.kt index c0c054c8..8110bb69 100644 --- a/app/src/main/java/io/github/wulkanowy/data/db/dao/StudentDao.kt +++ b/app/src/main/java/io/github/wulkanowy/data/db/dao/StudentDao.kt @@ -25,8 +25,8 @@ interface StudentDao { @Query("SELECT * FROM Students") fun loadAll(): Maybe> - @Query("UPDATE Students SET is_current = 1 WHERE student_id = :studentId") - fun updateCurrent(studentId: Int) + @Query("UPDATE Students SET is_current = 1 WHERE id = :id") + fun updateCurrent(id: Long) @Query("UPDATE Students SET is_current = 0") fun resetCurrent() diff --git a/app/src/main/java/io/github/wulkanowy/data/repositories/student/StudentLocal.kt b/app/src/main/java/io/github/wulkanowy/data/repositories/student/StudentLocal.kt index e05e7223..7bbd283f 100644 --- a/app/src/main/java/io/github/wulkanowy/data/repositories/student/StudentLocal.kt +++ b/app/src/main/java/io/github/wulkanowy/data/repositories/student/StudentLocal.kt @@ -35,7 +35,7 @@ class StudentLocal @Inject constructor( return Completable.fromCallable { studentDb.run { resetCurrent() - updateCurrent(student.studentId) + updateCurrent(student.id) } } }