fs.update(item_properties) deleting other properties

180
0
11-17-2023 07:13 AM
twangtx
New Contributor II

Background, I'm using this script, https://support.esri.com/en/Technical-Article/000023164, to update/overwrite existing hosted feature layer which already has a, summary, description, thumbnail, and credits already set. But I want to update the summary after I run the overwrite to reflect the date the item was updated with new data. I know it's shown elsewhere in the item, but I want to make it visible to users browsing  the DataHub without having to click on the card and needing to navigate to a new tab/window.

I noticed that when I fill out the "sharing_draft..." parameters in the above script, it only applies to the metadata and not on the item page. So I was going to use the item.update(item_properties = ....) function to update the item page after the overwrite. And I'm running into an issue where I only want to update the summary/ snippet using:

item.update(item_properties = {'snippet': "xyz"})

But after it runs it updates the summary just fine, but then deletes the other filled out information like the description, credits, and the thumbnail; tags and disclaimer are unaffected. The documentation here, https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#item, says it should only update the property you specify. So I'm wondering if this is a bug or am I doing something wrong or missing something?

Thank you,

Thomas

0 Kudos
0 Replies