diff options
author | Tim Laszlo <tim.laszlo@gmail.com> | 2011-04-25 21:33:46 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-06-14 12:36:45 -0500 |
commit | 9ec715f1e25f5274d6472536ce18a899358d3e66 (patch) | |
tree | 9132d40cab8741d8850f6097d95371946b5ee4cd | |
parent | 31cfa9f3a7b9f4ffd5fa32e22042681015489149 (diff) | |
download | bcfg2-9ec715f1e25f5274d6472536ce18a899358d3e66.tar.gz bcfg2-9ec715f1e25f5274d6472536ce18a899358d3e66.tar.bz2 bcfg2-9ec715f1e25f5274d6472536ce18a899358d3e66.zip |
DBStats: Stop duplicating data in reports_reason
-rwxr-xr-x | src/lib/Server/Reports/importscript.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/Server/Reports/importscript.py b/src/lib/Server/Reports/importscript.py index 1781e2fac..b6a3c2599 100755 --- a/src/lib/Server/Reports/importscript.py +++ b/src/lib/Server/Reports/importscript.py @@ -133,12 +133,9 @@ def load_stats(cdata, sdata, vlevel, logger, quick=False, location=''): try: rr = None - if not quick: - try: - rr = Reason.objects.filter(**kargs)[0] - except IndexError: - pass - if not rr: + try: + rr = Reason.objects.filter(**kargs)[0] + except IndexError: rr = Reason(**kargs) rr.save() if vlevel > 0: |