mongo: remove _id in inserted alarm changes
This change ensures that mongodb driver doesn't modify the alarm changes dictionary when we insert a new alarm changes. To avoid the insertion of the internal '_id' of mongodb. Change-Id: I9bcd643c9dc55449141cee94ef6826784e81e4e5
This commit is contained in:
parent
36269031a7
commit
aa8d3c0d39
@ -238,7 +238,7 @@ class Connection(base.Connection):
|
||||
def record_alarm_change(self, alarm_change):
|
||||
"""Record alarm change event.
|
||||
"""
|
||||
self.db.alarm_history.insert(alarm_change)
|
||||
self.db.alarm_history.insert(alarm_change.copy())
|
||||
|
||||
def get_samples(self, sample_filter, limit=None):
|
||||
"""Return an iterable of model.Sample instances.
|
||||
|
Loading…
x
Reference in New Issue
Block a user