Closed DShokes closed 8 years ago
@DShokes - should be fixed. Tested on both 10.4, and 10.3.1. Please pull the latest.
Looks good thank you.
>>> flTrees.applyEdits()
{u'addResults': [], u'deleteResults': [], u'updateResults': []}
>>> flTrees.applyEdits(addFeatures=[])
{u'addResults': [], u'deleteResults': [], u'updateResults': []}
ArcRest or ArcRestHelper
ArcRest
Version or date of download
3.5.3
Bug or Enhancement
Bug
Repo Steps or Enhancement details
Running applyEdits from the REST page with
[]
in either addFeatures or updateFeatures, returns:However, in arcREST, running
FeatureLayer.applyEdits(addFeatures=[],updateFeatures=[])
returns:This occurs because there is no parameter added unless the list contains features.To mimic the REST page, the applyEdits arguments defaulting to "[]" would have to change to None and two instance checks would have to be added:
This would still ensure FeatureLayer.applyEdits(addFeatures=None) returns the correct "invalid parameters" error. In my case, addFeatures was an empty list variable and the script was looking for "addResults" from applyEdits results.