From c8642bedcd3e50ccc8b1bf1e6e4e47c72e835ad9 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 29 Jun 2023 22:38:37 +1000 Subject: [PATCH] remove old method (#5120) - not used --- InvenTree/report/models.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/InvenTree/report/models.py b/InvenTree/report/models.py index 5595a346d7..9674095b85 100644 --- a/InvenTree/report/models.py +++ b/InvenTree/report/models.py @@ -7,7 +7,6 @@ import sys from django.conf import settings from django.core.cache import cache -from django.core.exceptions import FieldError, ValidationError from django.core.validators import FileExtensionValidator from django.db import models from django.template import Context, Template @@ -304,19 +303,6 @@ class TestReport(ReportTemplateBase): help_text=_('Include test results for stock items installed inside assembled item') ) - def matches_stock_item(self, item): - """Test if this report template matches a given StockItem objects.""" - try: - filters = validateFilterString(self.filters) - items = stock.models.StockItem.objects.filter(**filters) - except (ValidationError, FieldError): - return False - - # Ensure the provided StockItem object matches the filters - items = items.filter(pk=item.pk) - - return items.exists() - def get_test_keys(self, stock_item): """Construct a flattened list of test 'keys' for this StockItem: