Fix a CASCADE on shops

This commit is contained in:
2025-01-27 23:22:08 +01:00
parent b10e1f3952
commit c971ff9601
2 changed files with 26 additions and 1 deletions

View File

@@ -104,7 +104,7 @@ class RollingStock(BaseModel):
)
production_year = models.SmallIntegerField(null=True, blank=True)
shop = models.ForeignKey(
Shop, on_delete=models.CASCADE, null=True, blank=True
Shop, on_delete=models.SET_NULL, null=True, blank=True
)
purchase_date = models.DateField(null=True, blank=True)
price = models.DecimalField(