Skip to content

Remove with-bucket for record creation #1060

Description

@jma

Context

All record classes inherit from SonarRecord (in sonar/modules/api.py), which
mixes in FilesMixin from invenio_records_files. This forces every record
creation to handle a with_bucket parameter, even for resources that never
attach files.

Improvement suggestion

Split SonarRecord into two classes:

  • SonarRecord: base class without file support
  • SonarRecordWithFiles(SonarRecord, FilesMixin): adds file/bucket support

Modules that need files: documents, deposits, organisations, collections
Modules that do not: users, subdivisions, projects

Acceptance criteria

  • SonarRecord no longer inherits from FilesMixin
  • File-capable modules use the new SonarRecordWithFiles
  • No regressions in file upload/download for documents, deposits, etc.
  • Tests pass

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

    enhancementEnhancement of an existing feature

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions