summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/models.py
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-10-17 11:48:46 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-10-17 11:48:46 -0500
commit484853e39216e15b0de5ca6fd7906b5f294e8e4d (patch)
tree49ecbe190cffd85799413eabf378ddd7ea2a6bf2 /src/lib/Bcfg2/Reporting/models.py
parent7c3368f78e7c5042932a4fb58cea4b2ac3130358 (diff)
downloadbcfg2-484853e39216e15b0de5ca6fd7906b5f294e8e4d.tar.gz
bcfg2-484853e39216e15b0de5ca6fd7906b5f294e8e4d.tar.bz2
bcfg2-484853e39216e15b0de5ca6fd7906b5f294e8e4d.zip
Revert "migrate_db: skip db lookup since all should be known"
This caused data duplication on migration. This reverts commit 9707ee8e4c495133f329000d3e5b89d8b84e5998. Conflicts: src/lib/Bcfg2/Reporting/models.py
Diffstat (limited to 'src/lib/Bcfg2/Reporting/models.py')
-rw-r--r--src/lib/Bcfg2/Reporting/models.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Reporting/models.py b/src/lib/Bcfg2/Reporting/models.py
index 70a03c2db..b6549fc64 100644
--- a/src/lib/Bcfg2/Reporting/models.py
+++ b/src/lib/Bcfg2/Reporting/models.py
@@ -355,7 +355,7 @@ class BaseEntry(models.Model):
@classmethod
- def entry_get_or_create(cls, act_dict, skip_fetch=False):
+ def entry_get_or_create(cls, act_dict):
"""Helper to quickly lookup an object"""
cls_name = cls().__class__.__name__
act_hash = hash_entry(act_dict)
@@ -365,11 +365,8 @@ class BaseEntry(models.Model):
newact = cache.get(act_key)
if newact:
return newact
-
- if not skip_fetch:
- acts = cls.objects.filter(hash_key=act_hash)
- else:
- acts = []
+
+ acts = cls.objects.filter(hash_key=act_hash)
if len(acts) > 0:
for act in acts:
for key in act_dict: