mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Add extra validation step
This commit is contained in:
		| @@ -154,7 +154,10 @@ class StockMove(APIView): | ||||
|         if 'location' not in data: | ||||
|             raise ValidationError({'location': 'Destination must be specified'}) | ||||
|  | ||||
|         loc_id = data.get(u'location') | ||||
|         try: | ||||
|             loc_id = int(data.get('location')) | ||||
|         except ValueError: | ||||
|             raise ValidationError({'location': 'Integer ID required'}) | ||||
|  | ||||
|         try: | ||||
|             location = StockLocation.objects.get(pk=loc_id) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user