Description
The Quick Start guide passes a FileRetentionSetting to B2Api.update_file_legal_hold. The documented equivalent calls in the direct-file section repeat the same mistake. Retention settings belong to update_file_retention.
Steps to reproduce
b2_api.update_file_legal_hold(
file_id,
file_name,
FileRetentionSetting(RetentionMode.GOVERNANCE, retain_until),
)
Expected behavior
The guide should call update_file_legal_hold(..., LegalHold.ON) for legal holds and update_file_retention(..., FileRetentionSetting(...)) for retention.
Actual behavior
The guide sends a retention object to a method whose public signature requires a LegalHold value.
Environment
- Python version: Any supported version
- b2sdk version:
master at f3ab7b71
- OS: Any
Description
The Quick Start guide passes a
FileRetentionSettingtoB2Api.update_file_legal_hold. The documented equivalent calls in the direct-file section repeat the same mistake. Retention settings belong toupdate_file_retention.Steps to reproduce
Expected behavior
The guide should call
update_file_legal_hold(..., LegalHold.ON)for legal holds andupdate_file_retention(..., FileRetentionSetting(...))for retention.Actual behavior
The guide sends a retention object to a method whose public signature requires a
LegalHoldvalue.Environment
masteratf3ab7b71