mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05:42 +00:00 
			
		
		
		
	Bug fix for build allocation
- If the part did not have an image file the template failed to render
This commit is contained in:
		| @@ -22,8 +22,8 @@ Automatically allocate stock to this build? | ||||
| <tr> | ||||
|     <td> | ||||
|         <a class='hover-icon'> | ||||
|             <img class='hover-img-thumb' src='{{ item.stock_item.part.image.url }}'> | ||||
|             <img class='hover-img-large' src='{{ item.stock_item.part.image.url }}'> | ||||
|             <img class='hover-img-thumb' src='{% if item.stock_item.part.image %}{{ item.stock_item.part.image.url }}{% endif %}'> | ||||
|             <img class='hover-img-large' src='{% if item.stock_item.part.image %}{{ item.stock_item.part.image.url }}{% endif %}'> | ||||
|         </a> | ||||
|     </td> | ||||
|     <td> | ||||
|   | ||||
| @@ -101,7 +101,7 @@ class BuildAutoAllocate(AjaxUpdateView): | ||||
|             context['build'] = build | ||||
|             context['allocations'] = build.getAutoAllocations() | ||||
|         except Build.DoesNotExist: | ||||
|             context['error'] = 'No matching buidl found' | ||||
|             context['error'] = 'No matching build found' | ||||
|  | ||||
|         return context | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user