Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Commit

Permalink
Ensured db no longer contains empty standard rounds
Browse files Browse the repository at this point in the history
  • Loading branch information
DreierF committed Jan 12, 2018
1 parent 58ae979 commit e87b68c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/assets/migrations/database/25.sql
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
UPDATE Training SET weather = "" WHERE weather = NULL;
UPDATE Training SET location = "" WHERE location = NULL;
DELETE FROM StandardRound WHERE (SELECT COUNT(r._id) FROM RoundTemplate r WHERE r.standardRound=StandardRound._id)=0
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ class EditTrainingFragment : EditFragmentBase(), DatePickerDialog.OnDateSetListe
binding.standardRound.setOnClickListener { selectedItem, _ ->
navigationController.navigateToStandardRoundList(selectedItem!!)
}
binding.standardRound.setOnUpdateListener { item -> roundTarget = item!!.loadRounds()[0].targetTemplate }
binding.standardRound.setOnUpdateListener { item ->
roundTarget = item!!.loadRounds()[0].targetTemplate
}
binding.changeTargetFace.setOnClickListener {
navigationController.navigateToTarget(roundTarget!!,
requestCode = SR_TARGET_REQUEST_CODE,
Expand Down

0 comments on commit e87b68c

Please sign in to comment.