Skip to content

Commit 478cd6f

Browse files
committed
fix(migrate): group migrate error
1 parent 9b75d4e commit 478cd6f

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

rootfs/api/migrations/0021_migration_dryccfile.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,28 +9,16 @@ def migration_dryccfile(apps, schema_editor):
99
build = release.build
1010
if not build or not build.dryccfile or "pipeline" in build.dryccfile:
1111
continue
12-
config, envs = {}, {}
13-
if release.config:
14-
for value in release.config.values:
15-
if "ptype" in value:
16-
if value["ptype"] not in envs:
17-
envs[value["ptype"]] = {}
18-
envs[value["ptype"]][value["name"]] = value["value"]
19-
elif "group" in value:
20-
if value["group"] not in envs:
21-
config[value["group"]] = {}
22-
config[value["group"]][value["name"]] = value["value"]
2312
pipeline = {}
2413
for key, value in build.dryccfile.get('deploy', {}).items():
2514
pipeline.update({
2615
"%s.yaml" % key: {
2716
"kind": "pipeline",
2817
"ptype": key,
29-
"env": envs.get(key, {}),
3018
"deploy": value,
3119
}
3220
})
33-
build.dryccfile = {"config": config, "pipeline": pipeline}
21+
build.dryccfile = {"pipeline": pipeline}
3422
build.save()
3523

3624

0 commit comments

Comments
 (0)