Commit 3ccd109f authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Fixed missing upload_time on reindexed calcs.

parent fd7f69d2
......@@ -943,13 +943,18 @@ class Upload(Proc):
calc_metadata = dict(upload_metadata)
calc_metadata.update(calc_metadatas.get(calc.mainfile, {}))
calc_with_metadata.apply_user_metadata(calc_metadata)
if calc_with_metadata.upload_time is None:
calc_with_metadata.upload_time = self.upload_time if user_upload_time is None else user_upload_time
return calc_with_metadata
else:
user_upload_time = None
def get_metadata(calc: Calc):
return datamodel.CalcWithMetadata(**calc.metadata)
calc_with_metadata = datamodel.CalcWithMetadata(**calc.metadata)
calc_with_metadata.upload_time = self.upload_time
return calc_with_metadata
result = UploadWithMetadata(
upload_id=self.upload_id,
......
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