I need to make sure the entry does not have the same project and case id.
How is the best way to prevent a duplicate entry?
Here the project can not have the same case twice.
class Cases(models.Model ): project = models.ForeignKey ( Project, on_delete = models.CASCADE ) case = models.ForeignKey ( Case, on_delete = models.CASCADE ) active = models.BooleanField ( default = 1 ) Thank you.