Browse Source

优化新建分支

dev-DXTZYK
chenzhihang 1 year ago
parent
commit
cee77d3b93
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java

+ 4
- 1
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java View File

@@ -712,7 +712,10 @@ public class ModelsServiceImpl implements ModelsService {
dvcUtils.dvcCheckout(rootPath);
//干掉目标文件夹
dvcUtils.deleteDirectory(modelPath);
dvcUtils.moveFiles(sourcePath, modelPath);
if (modelsVo.getModelVersionVos().size() != 0) {
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl();
dvcUtils.moveFiles(sourcePath, modelPath);
}

if (modelsVo.getModelVersionVos().size() != 0) {
String sourcePath = modelsVo.getModelVersionVos().get(0).getUrl();


Loading…
Cancel
Save