mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Merge remote-tracking branch 'inventree/master'
This commit is contained in:
commit
fae90d19d5
@ -1289,10 +1289,23 @@ class BuildItem(models.Model):
|
|||||||
Return qualified URL for part thumbnail image
|
Return qualified URL for part thumbnail image
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
thumb_url = None
|
||||||
|
|
||||||
if self.stock_item and self.stock_item.part:
|
if self.stock_item and self.stock_item.part:
|
||||||
return InvenTree.helpers.getMediaUrl(self.stock_item.part.image.thumbnail.url)
|
try:
|
||||||
elif self.bom_item and self.stock_item.sub_part:
|
# Try to extract the thumbnail
|
||||||
return InvenTree.helpers.getMediaUrl(self.bom_item.sub_part.image.thumbnail.url)
|
thumb_url = self.stock_item.part.image.thumbnail.url
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if thumb_url is None and self.bom_item and self.bom_item.sub_part:
|
||||||
|
try:
|
||||||
|
thumb_url = self.bom_item.sub_part.image.thumbnail.url
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
if thumb_url is not None:
|
||||||
|
return InvenTree.helpers.getMediaUrl(thumb_url)
|
||||||
else:
|
else:
|
||||||
return InvenTree.helpers.getBlankThumbnail()
|
return InvenTree.helpers.getBlankThumbnail()
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -159,7 +159,7 @@ function loadStockTestResultsTable(table, options) {
|
|||||||
|
|
||||||
// Set "parent" for each existing row
|
// Set "parent" for each existing row
|
||||||
tableData.forEach(function(item, idx) {
|
tableData.forEach(function(item, idx) {
|
||||||
tableData[idx].parent = options.stock_item;
|
tableData[idx].parent = parent_node;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Once the test template data are loaded, query for test results
|
// Once the test template data are loaded, query for test results
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
invoke>=1.4.0 # Invoke build tool
|
invoke>=1.4.0 # Invoke build tool
|
||||||
wheel>=0.34.2 # Wheel
|
wheel>=0.34.2 # Wheel
|
||||||
Django==3.2.1 # Django package
|
Django==3.2.1 # Django package
|
||||||
pillow==8.1.1 # Image manipulation
|
pillow==8.2.0 # Image manipulation
|
||||||
djangorestframework==3.12.4 # DRF framework
|
djangorestframework==3.12.4 # DRF framework
|
||||||
django-cors-headers==3.2.0 # CORS headers extension for DRF
|
django-cors-headers==3.2.0 # CORS headers extension for DRF
|
||||||
django-filter==2.4.0 # Extended filtering options
|
django-filter==2.4.0 # Extended filtering options
|
||||||
@ -11,9 +11,8 @@ django-markdownx==3.0.1 # Markdown form fields
|
|||||||
django-markdownify==0.8.0 # Markdown rendering
|
django-markdownify==0.8.0 # Markdown rendering
|
||||||
coreapi==2.3.0 # API documentation
|
coreapi==2.3.0 # API documentation
|
||||||
pygments==2.7.4 # Syntax highlighting
|
pygments==2.7.4 # Syntax highlighting
|
||||||
# tablib==0.13.0 # Import / export data files (installed as dependency of django-import-export package)
|
|
||||||
django-crispy-forms==1.11.2 # Form helpers
|
django-crispy-forms==1.11.2 # Form helpers
|
||||||
django-import-export==2.0.0 # Data import / export for admin interface
|
django-import-export==2.5.0 # Data import / export for admin interface
|
||||||
tablib[xls,xlsx,yaml] # Support for XLS and XLSX formats
|
tablib[xls,xlsx,yaml] # Support for XLS and XLSX formats
|
||||||
django-cleanup==5.1.0 # Manage deletion of old / unused uploaded files
|
django-cleanup==5.1.0 # Manage deletion of old / unused uploaded files
|
||||||
flake8==3.8.3 # PEP checking
|
flake8==3.8.3 # PEP checking
|
||||||
|
Loading…
Reference in New Issue
Block a user