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
Context
All record classes inherit from
SonarRecord(insonar/modules/api.py), whichmixes in
FilesMixinfrominvenio_records_files. This forces every recordcreation to handle a
with_bucketparameter, even for resources that neverattach files.
Improvement suggestion
Split
SonarRecordinto two classes:SonarRecord: base class without file supportSonarRecordWithFiles(SonarRecord, FilesMixin): adds file/bucket supportModules that need files:
documents,deposits,organisations,collectionsModules that do not:
users,subdivisions,projectsAcceptance criteria
SonarRecordno longer inherits fromFilesMixinSonarRecordWithFiles