Skip to content

Commit

Permalink
fix: changed on_delete func from CASCADE to DO_NOTHING in all models
Browse files Browse the repository at this point in the history
  • Loading branch information
avinogrado authored and the-homeless-god committed Aug 31, 2024
1 parent 6fdbbfc commit 98cd389
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/backend/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Report(models.Model):
anyone_going_vacation = models.CharField(max_length=100,default="Nobody")
other_comments = models.TextField(max_length=1000,default="Nothing")
report_creater = models.ForeignKey(Employee, on_delete = models.DO_NOTHING,default=0)
related_project = models.ForeignKey(to="Project",on_delete=models.CASCADE,default=0)
related_project = models.ForeignKey(to="Project",on_delete=models.DO_NOTHING,default=0)
is_deleted = models.BooleanField(default=False)
final_report_color = models.CharField(max_length=1,choices=COLOR_CHOICES,default='G')

Expand All @@ -52,7 +52,7 @@ class Objective(models.Model):
}
objective_name = models.CharField(max_length=100)
objective_color = models.CharField(max_length=1,choices=COLOR_CHOICES,default="G")
related_report = models.ForeignKey(to = "Report", on_delete=models.CASCADE,default=0)
related_report = models.ForeignKey(to = "Report", on_delete=models.DO_NOTHING,default=0)
is_deleted = models.BooleanField(default=False)
objective_descripion = models.CharField(max_length=100)
def __str__(self):
Expand Down

0 comments on commit 98cd389

Please sign in to comment.