diff options
Diffstat (limited to 'src/lib/Bcfg2/Reporting')
-rw-r--r-- | src/lib/Bcfg2/Reporting/models.py | 9 |
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: |