delete()
Deletes a portfolio. The member objects stay untouched, only the assignment is removed.
1. Signature
-
Sync
-
Async
ecm.portfolio.delete(portfolio: ECMPortfolio | int) -> None
await ecm.portfolio.delete(portfolio: ECMPortfolio | int) -> None
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
The portfolio or its numeric ID. |
3. Example
portfolio = ecm.portfolio.create(subject="Temporary")
ecm.portfolio.delete(portfolio) # or ecm.portfolio.delete(portfolio.id)
assert ecm.portfolio.get(portfolio.id) is None
4. Related pages
-
delete_for() — deleting by recipient and subject
-
clear_objects() — clearing the content only