Commit 3d278a35 authored by David Sikter's avatar David Sikter
Browse files

Renamed Upload.user_metadata to the more explicit entries_user_and_system_metadata

parent f9f9c904
Pipeline #103916 passed with stages
in 30 minutes
......@@ -1013,7 +1013,7 @@ class Upload(Proc):
def re_pack(self):
''' A *process* that repacks the raw and archive data based on the current embargo data. '''
assert self.published
def process_upload(self):
......@@ -1351,7 +1351,7 @@ class Upload(Proc):'started to repack re-processed upload')
with utils.timer(logger, 'staged upload files re-packed'):
self.staging_upload_files.pack(self.user_metadata(), create=False, include_raw=False)
self.staging_upload_files.pack(self.entries_user_and_system_metadata(), create=False, include_raw=False)
self.last_update = datetime.utcnow()
......@@ -1472,7 +1472,11 @@ class Upload(Proc):
def user_metadata(self) -> Iterable[datamodel.EntryMetadata]:
def entries_user_and_system_metadata(self) -> Iterable[datamodel.EntryMetadata]:
Returns a list of :class:`nomad.datamodel.EntryMetadata` containing the user and
system metadata only, for all entries of this upload.
return [calc.user_and_system_metadata() for calc in Calc.objects(upload_id=self.upload_id)]
def set_upload_metadata(self, upload_metadata: UploadMetadata):
......@@ -36,7 +36,7 @@ from import search
from import assert_search_upload
from tests.test_files import assert_upload_files
from import client, oasis_central_nomad_client, session_client # pylint: disable=unused-import
from import test_users_dict # pylint: disable=unused-import
from import test_users_dict, test_user_auth # pylint: disable=unused-import
from tests.utils import create_template_upload_file, set_upload_entry_metadata
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment