Skip to content

Commit

Permalink
support MarketingName on Line (not just Service)
Browse files Browse the repository at this point in the history
  • Loading branch information
jclgoodwin committed May 5, 2024
1 parent 37133f4 commit 6714b75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bustimes/management/commands/import_transxchange.py
Expand Up @@ -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 (
Expand Down
2 changes: 2 additions & 0 deletions transxchange/txc.py
Expand Up @@ -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")
Expand Down

0 comments on commit 6714b75

Please sign in to comment.