-
Notifications
You must be signed in to change notification settings - Fork 123
Closed
Description
Currently getting validation errors when using the view extensions .apply()
method.
Example:
view_dict = {'off_nadir': 0, 'sun_azimuth': 133.076479108908, 'sun_elevation': 33.4042972979731}
item.ext.view.apply(**view_dict)
item.validate()
results in:
ValidationError: None is not of type 'number'
Failed validating 'type' in schema['allOf'][1]['properties']['properties']['properties']['view:incidence_angle']:
{'maximum': 90,
'minimum': 0,
'title': 'Center incidence angle',
'type': 'number'}
On instance['properties']['view:incidence_angle']:
None
this is not the case when directly adding each property:
"""
view_dict = {'off_nadir': 0, 'sun_azimuth': 133.076479108908, 'sun_elevation': 33.4042972979731}
item.ext.view.off_nadir = view_dict["off_nadir"]
item.ext.view.sun_azimuth = view_dict["sun_azimuth"]
item.ext.view.sun_elevation = view_dict["sun_elevation"]
item.validate()
the issue appears to be that when using the apply function, any non-included parameters are set to None
, causing issues in validation
Metadata
Metadata
Assignees
Labels
No labels