'reassign_to' fails with "AttributeError: 'Item' object has no attribute '_user_id'" because item objects are not properly initialized.
上次发布: March 15, 2019ArcGIS API for Python
漏洞 ID 编号
BUG-000120384
已提交
February 27, 2019
上次修改时间
June 5, 2024
适用范围
ArcGIS API for Python
找到的版本
1.5.3
操作系统
Windows OS
操作系统版本
2012 R2
修正版本
1.6.0
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
For now, work around this issue by adding an additional line to the for loop that explicitly sets the value of the item source owner user ID:for item in usercontent: item._user_id = 'sourceownerid' try: item.reassign_to(new_userid) except Exception as e: print("Item may have been already assigned to the user.")