Skip to content

Commit

Permalink
ORA-663 fix of save as program(set programTimestamp to 0)
Browse files Browse the repository at this point in the history
  • Loading branch information
cvejoski committed Sep 22, 2015
1 parent 7080d38 commit 74c37ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1372,7 +1372,8 @@ private String whitespace() {

private boolean isStringExpr(Expr<Void> e) {
// TODO: what about BINARY on the LHS
return e.getKind() == BlockType.STRING_CONST || (e.getKind() == BlockType.VAR && ((Var<?>) e).getTypeVar() == BlocklyType.STRING);
return e.getKind() == BlockType.STRING_CONST
|| (e.getKind() == BlockType.VAR && ((Var<?>) e).getTypeVar() == BlocklyType.STRING || e.getKind() == BlockType.TEXT_JOIN_FUNCT);
}

private boolean parenthesesCheck(Binary<Void> binary) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ public Response command(@OraData HttpSessionState httpSessionState, JSONObject f
} else if ( cmd.equals("saveAsP") ) {
String programName = request.getString("name");
String programText = request.getString("program");
Long timestamp = request.getLong("timestamp");
Timestamp programTimestamp = new Timestamp(timestamp);
Timestamp programTimestamp = new Timestamp(0);
pp.updateProgram(programName, userId, robotId, programText, programTimestamp, true);
if ( pp.isOk() ) {
Program program = pp.getProgram(programName, userId, robotId);
Expand Down

0 comments on commit 74c37ff

Please sign in to comment.