forked from github/dataease
fix: API 数据集同步错误
This commit is contained in:
parent
b1100a01e4
commit
85012cb42e
@ -185,7 +185,7 @@ public class ApiProvider extends DatasourceProvider{
|
||||
int i = 0;
|
||||
while (it.hasNext()){
|
||||
Map.Entry entry = (Map.Entry)it.next();
|
||||
row[i] = Optional.ofNullable(entry.getValue()).orElse("").toString();
|
||||
row[i] = Optional.ofNullable(entry.getValue()).orElse("").toString().replaceAll("\n", " ").replaceAll("\r", " ");
|
||||
i++;
|
||||
}
|
||||
dataList.add(row);
|
||||
|
@ -310,7 +310,7 @@ public class DatasourceService {
|
||||
Iterator it = data.entrySet().iterator();
|
||||
while (it.hasNext()){
|
||||
Map.Entry entry = (Map.Entry)it.next();
|
||||
jsonObject.put((String) entry.getKey(), entry.getValue());
|
||||
jsonObject.put((String) entry.getKey(), Optional.ofNullable(entry.getValue()).orElse("").toString().replaceAll("\n", " ").replaceAll("\r", " "));
|
||||
if(getFileds) {
|
||||
DatasetTableField tableField = new DatasetTableField();
|
||||
tableField.setOriginName((String) entry.getKey());
|
||||
|
Loading…
Reference in New Issue
Block a user