Commit 94213e0d authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Minor fix to repair upload metadata script. [skip ci]

parent 7942d3ef
Pipeline #53378 skipped
...@@ -10,6 +10,11 @@ uploads = mongo.fairdi_nomad_migration.upload ...@@ -10,6 +10,11 @@ uploads = mongo.fairdi_nomad_migration.upload
def doit(upload): def doit(upload):
example = calcs.find_one({'upload_id': upload}) example = calcs.find_one({'upload_id': upload})
user_id = example['metadata']['uploader']['id'] user_id = example['metadata']['uploader']['id']
if 'upload_time' not in example['metadata']:
print('no upload time in %s' % upload)
return
upload_time = example['metadata']['upload_time'] upload_time = example['metadata']['upload_time']
uploads.update_one( uploads.update_one(
......
Supports Markdown
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