Set explicit relation name
This commit is contained in:
parent
7aee79787a
commit
196a49f18b
|
@ -3,9 +3,9 @@ from . import Label
|
|||
|
||||
|
||||
class Error(models.Model):
|
||||
label_id = models.ForeignKey(Label, on_delete=models.CASCADE)
|
||||
label = models.ForeignKey(Label, on_delete=models.CASCADE, related_name='errors')
|
||||
error = models.TextField()
|
||||
time = models.DateTimeField()
|
||||
|
||||
class Meta:
|
||||
db_table = 'error'
|
||||
db_table = 'error'
|
||||
|
|
Loading…
Reference in New Issue
Block a user