Don't modify the original metadata yet

I've lost some metadata during testing because of deleting the new `Metadata` instances without restoring the original metadata JSON.
This commit is contained in:
tcely 2025-04-17 20:24:01 -04:00 committed by GitHub
parent b4d7f01975
commit 8ec35292b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1125,10 +1125,10 @@ class Media(models.Model):
data = self.loaded_metadata
data[key] = value
self.ingest_metadata(data)
epoch = self.get_metadata_first_value('epoch', arg_dict=data)
migrated = dict(migrated=True, epoch=epoch)
#epoch = self.get_metadata_first_value('epoch', arg_dict=data)
#migrated = dict(migrated=True, epoch=epoch)
from common.utils import json_serial
compact_json = json.dumps(migrated, separators=(',', ':'), default=json_serial)
compact_json = json.dumps(data, separators=(',', ':'), default=json_serial)
self.metadata = compact_json
self.save()
from common.logger import log