|  | @@ -26,17 +26,17 @@ class storage_prototype:
 | 
	
		
			
				|  |  |          """Отфильтровать по номенклатуре"""
 | 
	
		
			
				|  |  |          result = []
 | 
	
		
			
				|  |  |          for item in self.data:
 | 
	
		
			
				|  |  | -            if item.nomenclature.name != filter_model.name:
 | 
	
		
			
				|  |  | +            if item.nomenclature.id != filter_model.id:
 | 
	
		
			
				|  |  |                  continue
 | 
	
		
			
				|  |  |              result.append(item)
 | 
	
		
			
				|  |  |          return storage_prototype(result)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      def filter_recipe(self, recipe):
 | 
	
		
			
				|  |  |          """Отфильтровать по рецепту"""
 | 
	
		
			
				|  |  | -        recipe_nomens = set([row.nomenclature.name for row in recipe.ingredients])
 | 
	
		
			
				|  |  | +        recipe_nomens = set([row.nomenclature.id for row in recipe.ingredients])
 | 
	
		
			
				|  |  |          result = []
 | 
	
		
			
				|  |  |          for item in self.data:
 | 
	
		
			
				|  |  | -            if item.nomenclature.name not in recipe_nomens:
 | 
	
		
			
				|  |  | +            if item.nomenclature.id not in recipe_nomens:
 | 
	
		
			
				|  |  |                  continue
 | 
	
		
			
				|  |  |              result.append(item)
 | 
	
		
			
				|  |  |          return storage_prototype(result)
 |