2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 19:45:46 +00:00

Merge pull request #267 from SchrodingersGat/bom-img

BOM table improvements
This commit is contained in:
Oliver
2019-05-09 00:42:33 +10:00
committed by GitHub
4 changed files with 13 additions and 5 deletions

View File

@ -10,6 +10,7 @@ import os
from django.db import models
from django.urls import reverse
from django.conf import settings
from django.contrib.staticfiles.templatetags.staticfiles import static
def rename_company_image(instance, filename):
@ -85,7 +86,7 @@ class Company(models.Model):
if self.image:
return os.path.join(settings.MEDIA_URL, str(self.image.url))
else:
return ''
return static('/img/blank_image.png')
@property
def part_count(self):