No record augmentation for software-generated records.

It was already done when they were generated.
This commit is contained in:
Tom Keffer
2020-03-19 16:17:54 -07:00
parent 9d14fceb2d
commit 950d6f2a39

View File

@@ -598,10 +598,13 @@ class StdArchive(StdService):
"""Called when a new archive record has arrived.
Put it in the archive database."""
# If requested, extract any extra information we can out of the
# accumulator and put it in the record.
if self.record_augmentation and self.old_accumulator \
and event.record['dateTime'] == self.old_accumulator.timespan.stop:
# If requested, extract any extra information we can out of the accumulator and put it in
# the record. Not necessary in the case of software record generation because it has
# already been done.
if self.record_augmentation \
and self.old_accumulator \
and event.record['dateTime'] == self.old_accumulator.timespan.stop \
and event.origin != 'software':
self.old_accumulator.augmentRecord(event.record)
dbmanager = self.engine.db_binder.get_manager(self.data_binding)