Commit 1860f06e authored by stef's avatar stef
Browse files

[enh] only items verified or confirmed in ods

parent 496d707d
...@@ -5,6 +5,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = "nnmon.settings" ...@@ -5,6 +5,7 @@ os.environ['DJANGO_SETTINGS_MODULE'] = "nnmon.settings"
from django.conf import settings from django.conf import settings
from bt.models import Violation from bt.models import Violation
from django.db.models import Count
import ooolib import ooolib
from django.utils.html import strip_tags from django.utils.html import strip_tags
import re, htmlentitydefs import re, htmlentitydefs
...@@ -63,7 +64,8 @@ def save_ods(): ...@@ -63,7 +64,8 @@ def save_ods():
doc.set_cell_property('bold', False) doc.set_cell_property('bold', False)
row=3 row=3
for v in Violation.objects.filter(activationid='').exclude(state__in=['closed', 'ooscope', 'duplicate']): for v in Violation.objects.filter(activationid='').exclude(state__in=['closed', 'ooscope', 'duplicate']).annotate(total=Count('confirmation')):
if>0 or v.state=='verified':
doc.set_row_property(row, 'height', '16.5pt') doc.set_row_property(row, 'height', '16.5pt')
doc.set_cell_property('wrap-option', 'wrap') doc.set_cell_property('wrap-option', 'wrap')
doc.set_cell_value(1, row, "string", doc.set_cell_value(1, row, "string",
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment