Merge branch 'master' of github.com:metersphere/metersphere

This commit is contained in:
chenjianxing 2021-03-23 17:26:11 +08:00
commit 8993e53b70
2 changed files with 8 additions and 4 deletions

View File

@ -114,9 +114,13 @@ public class ApiAutomationService {
Map<String, String> map = d.getEnvironmentMap();
if (map != null) {
if (map.isEmpty()) {
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
if (CollectionUtils.isNotEmpty(ids)) {
idList.addAll(new HashSet<>(ids));
try {
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
if (CollectionUtils.isNotEmpty(ids)) {
idList.addAll(new HashSet<>(ids));
}
} catch (Exception e) {
LogUtil.error("JSONPath.read projectId fail.");
}
} else {
Set<String> set = d.getEnvironmentMap().keySet();

View File

@ -215,7 +215,7 @@ export default {
//
async function f() {
return await axios.post('/performance/file/' + getCurrentProjectID() + '/getMetadataByName', {filename: file.name})
return await axios.post('/performance/file/' + getCurrentProjectID() + '/getMetadataByName', {name: file.name})
}
await f().then(res => {