Repository: ambari
Updated Branches:
  refs/heads/trunk 931021f56 -> c63a8627c


AMBARI-16445. [Hive View] Error while Closing unsaved Sheet (pallavkul)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/c63a8627
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/c63a8627
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/c63a8627

Branch: refs/heads/trunk
Commit: c63a8627cc447d4ecd3f01155a79709d9009e9c5
Parents: 931021f
Author: Pallav Kulshreshtha <[email protected]>
Authored: Thu May 12 13:26:09 2016 +0530
Committer: Pallav Kulshreshtha <[email protected]>
Committed: Thu May 12 13:26:09 2016 +0530

----------------------------------------------------------------------
 .../main/resources/ui/hive-web/app/controllers/open-queries.js  | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c63a8627/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/open-queries.js
----------------------------------------------------------------------
diff --git 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/open-queries.js
 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/open-queries.js
index a4048be..e4e1490 100644
--- 
a/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/open-queries.js
+++ 
b/contrib/views/hive/src/main/resources/ui/hive-web/app/controllers/open-queries.js
@@ -364,7 +364,10 @@ export default Ember.ArrayController.extend({
             });
           }, function () {
             model.rollback();
-            query.rollback();
+            // Rollback the query if it is a DS model
+            if(query.get('constructor.typeKey') !== undefined) {
+              query.rollback();
+            }
             self.closeTab(tab, true);
           });
         }

Reply via email to