Repository: incubator-ranger
Updated Branches:
  refs/heads/master 163586917 -> eed536b13


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/eed536b1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/eed536b1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/eed536b1

Branch: refs/heads/master
Commit: eed536b1335b324232fce02ae2368d479d75c343
Parents: 1635869
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:53:16 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/eed536b1/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