Repository: incubator-ranger
Updated Branches:
  refs/heads/ranger-0.6 13e36cf1d -> 4a332a93e


RANGER-1175: Create policy fails for updated servicedef (Fixed :policy creation 
fails for newly added resource attr in hive-service def)

Signed-off-by: rmani <rm...@hortonworks.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/4a332a93
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/4a332a93
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/4a332a93

Branch: refs/heads/ranger-0.6
Commit: 4a332a93ea05cc953ac4a7063f437f2609112a37
Parents: 13e36cf
Author: ni3galave <nitin.gal...@gmail.com>
Authored: Fri Sep 16 11:46:34 2016 +0530
Committer: rmani <rm...@hortonworks.com>
Committed: Tue Sep 20 22:58:31 2016 -0700

----------------------------------------------------------------------
 .../main/webapp/scripts/views/policies/RangerPolicyForm.js   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/4a332a93/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js 
b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
index aae9c70..317c6ee 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyForm.js
@@ -380,10 +380,10 @@ define(function(require){
                        });// 'isRecursive' attribute of model is updated
                        //set sameLevel fieldAttr value with resource name
                        _.each(this.model.attributes, function(val, key) {
-                if(key.indexOf("sameLevel") >= 0){ 
-                       this.model.set(val.resourceType,val);
-                       that.model.unset(key);
-                }
+                              if(key.indexOf("sameLevel") >= 0 && 
!_.isNull(val)){ 
+                                       this.model.set(val.resourceType,val);
+                                       that.model.unset(key);
+                               }
                        },this);
                        //To set resource values
                        //Check for masking policies

Reply via email to