From 15464a849d0367a42499a5771fd2050c811cd83e Mon Sep 17 00:00:00 2001 From: 0einstein0 Date: Thu, 8 Aug 2024 16:30:06 +0200 Subject: [PATCH] files: sync file access status --- .../records/systemfields/files/manager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/invenio_records_resources/records/systemfields/files/manager.py b/invenio_records_resources/records/systemfields/files/manager.py index 60673816..f7297139 100644 --- a/invenio_records_resources/records/systemfields/files/manager.py +++ b/invenio_records_resources/records/systemfields/files/manager.py @@ -367,11 +367,11 @@ def sync(self, src_files, delete_extras=True): else: self[f_key] = obj_or_key - # Check for metadata changes + # Check for metadata and access changes for key, dest_rf in self.entries.items(): if key in src_files: src_rf = src_files[key] - if src_rf.metadata != dest_rf.metadata: + if src_rf.metadata != dest_rf.metadata or src_rf.access != dest_rf.access: obj_or_key = dest_rf.object_version self[key] = obj_or_key, dict(src_rf)