fix(be): migration for bolt

This commit is contained in:
Denis Gukov 2023-07-09 11:35:52 +02:00
parent 0914aaa332
commit bfa9a3c00b
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ func (d migration_2_8_91) Apply() (err error) {
for projectID, projectUsers := range usersByProjectMap {
for userId, userData := range projectUsers {
if userData["admin"] == "true" {
if userData["admin"] == true {
userData["role"] = "owner"
} else {
userData["role"] = "task_runner"

View File

@ -26,7 +26,7 @@ func TestMigration_2_8_91_Apply(t *testing.T) {
}
err = r.Put([]byte("0000000001"),
[]byte("{\"id\":\"1\",\"project_id\":\"1\",\"admin\": \"true\"}"))
[]byte("{\"id\":\"1\",\"project_id\":\"1\",\"admin\": true}"))
return err
})