Skip to content

B2 SDK docs: file-retention examples call update_file_legal_hold with the wrong setting type #585

Description

@ffumero2003

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions