mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
fix(be): migration for bolt
This commit is contained in:
parent
0914aaa332
commit
bfa9a3c00b
@ -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"
|
||||
|
@ -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
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user