mirror of
				https://github.com/graphql-python/graphene-django.git
				synced 2025-10-26 05:30:59 +03:00 
			
		
		
		
	Fix ingredient model (#1258)
Add the required positional argument: 'on_delete'
This commit is contained in:
		
							parent
							
								
									1e4b03b975
								
							
						
					
					
						commit
						ef9d67302e
					
				|  | @ -70,7 +70,7 @@ Let's get started with these models: | |||
|     class Ingredient(models.Model): | ||||
|         name = models.CharField(max_length=100) | ||||
|         notes = models.TextField() | ||||
|         category = models.ForeignKey(Category, related_name='ingredients') | ||||
|         category = models.ForeignKey(Category, related_name='ingredients', on_delete=models.CASCADE) | ||||
| 
 | ||||
|         def __str__(self): | ||||
|             return self.name | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user