Merge pull request #933 from SchrodingersGat/report-select-fix

Bugfix: Select test report template
This commit is contained in:
Oliver 2020-08-26 15:03:39 +10:00 committed by GitHub
commit 0b4f732160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class TestReport(ReportTemplateBase):
Test if this report template matches a given StockItem objects Test if this report template matches a given StockItem objects
""" """
filters = validateFilterString(self.part_filters) filters = validateFilterString(self.filters)
items = StockItem.objects.filter(**filters) items = StockItem.objects.filter(**filters)

View File

@ -237,7 +237,7 @@ class TestReportFormatForm(HelperForm):
for template in templates: for template in templates:
if template.matches_stock_item(self.stock_item): if template.matches_stock_item(self.stock_item):
choices.append(template) choices.append((template.pk, template))
return choices return choices