django.db.utils.IntegrityError: column "group_id" contains null values
class Techgroup(models.Model):
""" Group of technology """
name = models.CharField('group_name', max_length=32, unique=True)
def __str__(self):
return self.name
class Technology(models.Model):
"""Technologies."""
name = models.CharField('technology name', max_length=32, unique=True)
group = models.ForeignKey(Techgroup, on_delete=models.CASCADE, related_name="group")
def __str__(self):
return self.name
group = models.ForeignKey(Techgroup, on_delete=models.CASCADE, related_name="group", null=True, blank=True)
group = models.ForeignKey(Techgroup, on_delete=models.CASCADE, related_name="group")