Commit 9e87a36f964a8e4851af056c143d54ae09748859

Authored by xp.Huang
2 parents cff95ced 3a9f6420

Merge branch 'master' into 'master_dev'

perf: 脚本语言为空时,设置默认为JS

See merge request yunteng/thingskit!435
@@ -853,7 +853,7 @@ public class DefaultTransportApiService implements TransportApiService { @@ -853,7 +853,7 @@ public class DefaultTransportApiService implements TransportApiService {
853 return TransportProtos.ScriptResponseProto.newBuilder().setTenantIdLSB(uuid.getLeastSignificantBits()) 853 return TransportProtos.ScriptResponseProto.newBuilder().setTenantIdLSB(uuid.getLeastSignificantBits())
854 .setTenantIdMSB(uuid.getMostSignificantBits()) 854 .setTenantIdMSB(uuid.getMostSignificantBits())
855 .setScriptId(script.getId()) 855 .setScriptId(script.getId())
856 - .setScriptLanguage(script.getScriptLanguage().name()) 856 + .setScriptLanguage(null == script.getScriptLanguage()?ScriptLanguage.JS.name():script.getScriptLanguage().name())
857 .setScriptType(script.getScriptType()) 857 .setScriptType(script.getScriptType())
858 .setContent(script.getScriptLanguage().equals(ScriptLanguage.TBEL)? 858 .setContent(script.getScriptLanguage().equals(ScriptLanguage.TBEL)?
859 script.getConvertTbel():script.getConvertJs()).build(); 859 script.getConvertTbel():script.getConvertJs()).build();