diff --git a/bustimes/management/commands/import_transxchange.py b/bustimes/management/commands/import_transxchange.py index 9629b7d22..2d12f7a95 100644 --- a/bustimes/management/commands/import_transxchange.py +++ b/bustimes/management/commands/import_transxchange.py @@ -1140,7 +1140,9 @@ def handle_service(self, filename: str, transxchange, txc_service, today, stops) service.colour_id = operator.colour_id break - line_brand = line.line_brand + line_brand = line.line_brand or line.marketing_name + if line_brand: + logger.info(line_brand) if txc_service.marketing_name: logger.info(txc_service.marketing_name) if txc_service.marketing_name in ( diff --git a/transxchange/txc.py b/transxchange/txc.py index 0587c5a77..211cef14e 100644 --- a/transxchange/txc.py +++ b/transxchange/txc.py @@ -646,6 +646,8 @@ def __init__(self, element): self.line_brand = "" self.line_name = line_name.strip() + self.marketing_name = element.findtext("MarketingName") + if ( element.findtext("LineColour") or element.findtext("LineFontColour")