Skip to content

Commit

Permalink
Fix rename of JS functions
Browse files Browse the repository at this point in the history
Resolves: #8940
  • Loading branch information
luigidellaquila committed Jul 8, 2019
1 parent 58cc64d commit 8cb2713
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ public synchronized void dropFunction(String iName) {

public void updatedFunction(ODocument function) {
reloadIfNeeded(ODatabaseRecordThreadLocal.instance().get());
try {
String oldName = (String) function.getOriginalValue("name");
functions.remove(oldName.toUpperCase(Locale.ENGLISH));
}catch (Exception e){

}
ODocument metadataCopy = function.copy();
OCallable<Object, Map<Object, Object>> callBack = null;
OFunction oldFunction = functions.get(metadataCopy.field("name").toString());
Expand Down

0 comments on commit 8cb2713

Please sign in to comment.