Esri / Esri/arcgis-python-api

Cloning item is not assigning the correct owner

Aperta
#2,500 0 commenti 0 reazioni 1 assegnatario Rivendicata da @nparavicini7 Vedi su GitHub
bug
Lingua principale
Python
Stelle
2.2k
Fork
1.2k
Merge medio
2h 40m
PR unite (30g)
2

Descrizione

**Describe the bug**
When cloning an item and setting a new owner, the owner will not be respected if that item does not have a folder.

**To Reproduce**
Clone an item without a folder and setting an owner

**Platform (please complete the following information):**
- OS: Windows
- Python API Version: 2.4.3

**Additional context**
The bug appears because when there is no folder the given owner is not respected.

```
if self.folder:
folder = self.target.content.folders.get(
folder=self.folder, owner=self.owner
)
else:
folder = self.target.content.folders.get()
```

The fix
`folder = self.target.content.folders.get(owner=self.owner)`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.