clear_objects()
Clears a portfolio. The portfolio itself and all member objects stay, only the assignments are removed.
1. Signature
-
Sync
-
Async
ecm.portfolio.clear_objects(portfolio: ECMPortfolio | int) -> None
await ecm.portfolio.clear_objects(portfolio: ECMPortfolio | int) -> None
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
The portfolio or its numeric ID. |
3. Example
ecm.portfolio.clear_objects(portfolio)
assert ecm.portfolio.get(portfolio.id).objects == []
4. Related pages
-
delete() — delete the portfolio itself
-
add_objects() — set new content