Improve user experience in admin and UI (#45)

This commit is contained in:
2025-01-18 15:37:56 +01:00
committed by GitHub
parent c467fb24ca
commit ddcf06994d
17 changed files with 364 additions and 106 deletions

View File

@@ -39,6 +39,10 @@ class Consist(BaseModel):
def get_absolute_url(self):
return reverse("consist", kwargs={"uuid": self.uuid})
@property
def country(self):
return self.company.country
def clean(self):
if self.consist_item.filter(rolling_stock__published=False).exists():
raise ValidationError(