delete_for()
Deletes a portfolio addressed by recipient and subject. Useful when the ID is not at hand, for example when cleaning up portfolios another process created.
1. Signature
-
Sync
-
Async
ecm.portfolio.delete_for(*, subject: str, recipient: str | None = None,
recipient_id: int | None = None) -> None
await ecm.portfolio.delete_for(...) -> None
2. Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
|
|
— |
Title of the portfolio. |
|
|
|
Login name of the recipient. |
|
|
|
Numeric user ID of the recipient, the alternative to |
3. Errors
ValueError when neither recipient nor recipient_id is set. The check happens before the
server call.
4. Example
ecm.portfolio.delete_for(recipient="ROOT", subject="Follow-up week 34")
ecm.portfolio.delete_for(recipient_id=2, subject="Follow-up week 34")
5. Related pages
-
delete() — deleting by ID