mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	linting
This commit is contained in:
		@@ -309,10 +309,10 @@ class BuildAllocationItemSerializer(serializers.Serializer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def validate_bom_item(self, bom_item):
 | 
					    def validate_bom_item(self, bom_item):
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        build = self.context['build']
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        # TODO: Fix this validation - allow for variants and substitutes!
 | 
					        # TODO: Fix this validation - allow for variants and substitutes!
 | 
				
			||||||
        """
 | 
					        """
 | 
				
			||||||
 | 
					        build = self.context['build']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # BomItem must point to the same 'part' as the parent build
 | 
					        # BomItem must point to the same 'part' as the parent build
 | 
				
			||||||
        if build.part != bom_item.part:
 | 
					        if build.part != bom_item.part:
 | 
				
			||||||
            raise ValidationError(_("bom_item.part must point to the same part as the build order"))
 | 
					            raise ValidationError(_("bom_item.part must point to the same part as the build order"))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1407,7 +1407,7 @@ function allocateStockToBuild(build_id, part_id, bom_items, options={}) {
 | 
				
			|||||||
                        onSelect: function(data, field, opts) {
 | 
					                        onSelect: function(data, field, opts) {
 | 
				
			||||||
                            // Adjust the 'quantity' field based on availability
 | 
					                            // Adjust the 'quantity' field based on availability
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            if (!("quantity" in data)) {
 | 
					                            if (!('quantity' in data)) {
 | 
				
			||||||
                                return;
 | 
					                                return;
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1666,7 +1666,7 @@ function loadSalesOrderLineItemTable(table, options={}) {
 | 
				
			|||||||
                    onSelect: function(data, field, opts) {
 | 
					                    onSelect: function(data, field, opts) {
 | 
				
			||||||
                        // Quantity available from this stock item
 | 
					                        // Quantity available from this stock item
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        if (!("quantity" in data)) {
 | 
					                        if (!('quantity' in data)) {
 | 
				
			||||||
                            return;
 | 
					                            return;
 | 
				
			||||||
                        }
 | 
					                        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user