Skip to content

Commit

Permalink
Fixed related name
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanplague committed Oct 10, 2023
1 parent 6d5bfd4 commit ce29a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cinema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class Movie(models.Model):
title = models.CharField(max_length=255)
description = models.TextField()
duration = models.IntegerField()
actors = models.ManyToManyField(Actor, related_name="actors")
genres = models.ManyToManyField(Genre, related_name="genres")
actors = models.ManyToManyField(Actor, related_name="movies")
genres = models.ManyToManyField(Genre, related_name="movies")

def __str__(self):
return self.title

0 comments on commit ce29a14

Please sign in to comment.