🐛 Bound hours per week on settings
The field accepted any number from 0.01 up, so a typo or a bad client could store more hours than a week has and break every expected value derived from it. The initial migration limits hours_per_week to 168; no database was ever deployed with the previous version of the migration.
This commit is contained in:
@@ -42,6 +42,7 @@ func TestCloseWeekBasic(t *testing.T) {
|
||||
wantBool(t, cw, "deleted", false)
|
||||
|
||||
stored := e.load("closed_weeks", cw.Id)
|
||||
wantInt(t, stored, "expected_ms", fortyH)
|
||||
wantInt(t, stored, "worked_ms", fortyH)
|
||||
wantInt(t, stored, "delta_ms", 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user