Skip to content

Commit

Permalink
Fixes: error in policy creation on contrail UI R3.0
Browse files Browse the repository at this point in the history
When validating a value, check for None and if it is None, skip
validating it.

Change-Id: I3b4509e77528fe2fc2670eac195465e85d613426
Closes-Bug: 1577933
  • Loading branch information
Ranjeet R committed May 4, 2016
1 parent 2b91358 commit 6aed551
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/api-server/vnc_cfg_api_server.py
Expand Up @@ -203,6 +203,8 @@ def _validate_complex_type(cls, dict_cls, dict_body):
attr_type = attr_type_vals['attr_type']
restrictions = attr_type_vals['restrictions']
is_array = attr_type_vals.get('is_array', False)
if value is None:
continue
if is_array:
if not isinstance(value, list):
raise ValueError('Field %s must be a list. Received value: %s'
Expand Down

0 comments on commit 6aed551

Please sign in to comment.