Improve road number sorting and enforce company on consists

This commit is contained in:
2022-07-15 18:10:18 +02:00
parent e55f953c8a
commit 70c12c69b2
5 changed files with 64 additions and 6 deletions

View File

@@ -13,9 +13,7 @@ class Consist(models.Model):
consist_address = models.SmallIntegerField(
default=None, null=True, blank=True
)
company = models.ForeignKey(
Company, on_delete=models.CASCADE, null=True, blank=True
)
company = models.ForeignKey(Company, on_delete=models.CASCADE)
era = models.CharField(max_length=32, blank=True)
image = models.ImageField(upload_to="images/", null=True, blank=True)
notes = models.TextField(blank=True)