Skip to content

Commit ef9d673

Browse files
authored
Fix ingredient model (#1258)
Add the required positional argument: 'on_delete'
1 parent 1e4b03b commit ef9d673

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/tutorial-relay.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Let's get started with these models:
7070
class Ingredient(models.Model):
7171
name = models.CharField(max_length=100)
7272
notes = models.TextField()
73-
category = models.ForeignKey(Category, related_name='ingredients')
73+
category = models.ForeignKey(Category, related_name='ingredients', on_delete=models.CASCADE)
7474
7575
def __str__(self):
7676
return self.name

0 commit comments

Comments
 (0)