2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 19:20:55 +00:00

removes all lines consisting only of spaces

this really bothers me for some reason - nothing technical
This commit is contained in:
2021-05-06 12:11:38 +02:00
parent ecc9eec084
commit f2b0717d10
91 changed files with 494 additions and 494 deletions

View File

@ -62,7 +62,7 @@ class StockItemReportMixin:
"""
Return a list of requested stock items
"""
items = []
params = self.request.query_params
@ -101,7 +101,7 @@ class BuildReportMixin:
params = self.request.query_params
for key in ['build', 'build[]', 'builds', 'builds[]']:
if key in params:
builds = params.getlist(key, [])
@ -268,7 +268,7 @@ class StockItemTestReportList(ReportListView, StockItemReportMixin):
serializer_class = TestReportSerializer
def filter_queryset(self, queryset):
queryset = super().filter_queryset(queryset)
# List of StockItem objects to match against
@ -342,7 +342,7 @@ class StockItemTestReportPrint(generics.RetrieveAPIView, StockItemReportMixin, R
items = self.get_items()
return self.print(request, items)
class BOMReportList(ReportListView, PartReportMixin):
"""
@ -459,7 +459,7 @@ class BuildReportList(ReportListView, BuildReportMixin):
We need to compare the 'filters' string of each report,
and see if it matches against each of the specified parts
# TODO: This code needs some refactoring!
"""
@ -546,7 +546,7 @@ class POReportList(ReportListView, OrderReportMixin):
valid_report_ids = set()
for report in queryset.all():
matches = True
# Filter string defined for the report object
@ -565,7 +565,7 @@ class POReportList(ReportListView, OrderReportMixin):
except FieldError:
matches = False
break
if matches:
valid_report_ids.add(report.pk)
else:
@ -629,7 +629,7 @@ class SOReportList(ReportListView, OrderReportMixin):
valid_report_ids = set()
for report in queryset.all():
matches = True
# Filter string defined for the report object
@ -648,7 +648,7 @@ class SOReportList(ReportListView, OrderReportMixin):
except FieldError:
matches = False
break
if matches:
valid_report_ids.add(report.pk)
else:

View File

@ -52,7 +52,7 @@ class ReportFileUpload(FileSystemStorage):
For example, a snippet or asset file is referenced in a template by filename,
and we do not want that filename to change when we upload a new *version*
of the snippet or asset file.
This uploader class performs the following pseudo-code function:
- If the model is *new*, proceed as normal
@ -408,7 +408,7 @@ class PurchaseOrderReport(ReportTemplateBase):
@classmethod
def getSubdir(cls):
return 'purchaseorder'
filters = models.CharField(
blank=True,
max_length=250,
@ -479,7 +479,7 @@ def rename_snippet(instance, filename):
if str(filename) == str(instance.snippet):
fullpath = os.path.join(settings.MEDIA_ROOT, path)
fullpath = os.path.abspath(fullpath)
if os.path.exists(fullpath):
logger.info(f"Deleting existing snippet file: '{filename}'")
os.remove(fullpath)

View File

@ -22,7 +22,7 @@ def image_data(img, fmt='PNG'):
buffered = BytesIO()
img.save(buffered, format=fmt)
img_str = base64.b64encode(buffered.getvalue())
return f"data:image/{fmt.lower()};charset=utf-8;base64," + img_str.decode()

View File

@ -104,7 +104,7 @@ def company_image(company):
path = os.path.abspath(path)
return f"file://{path}"
@register.simple_tag()
def internal_link(link, text):