Fix destination display

This commit is contained in:
Klaus-Uwe Mitterer 2017-09-25 22:11:30 +02:00
parent a921460a11
commit 7341b69ebf

View file

@ -80,7 +80,7 @@ class Service:
out = " " * indent + "<service%s>\n" % ("" if iid is False else " id=\"%i\"" % iid)
out += (" " * indent + " <name>%s</name>\n" % self.name) if name else ""
out += (" " * indent + " <destination>%s</destination>\n" % self.dest) if dest and self.dest else ""
out += (" " * indent + " <destination>%s</destination>\n" % self.dest.name) if dest and self.dest else ""
if depst or deptime or deppf or currdep:
out += " " * indent + " <departure>\n"
@ -119,7 +119,7 @@ class Service:
out += (" " * indent + " \"@id\": %i,\n" % iid) if iid else ""
out += (" " * indent + " \"name\": \"%s\",\n" % self.name) if name else ""
out += (" " * indent + " \"destination\": \"%s\",\n" % self.dest) if dest and self.dest else ""
out += (" " * indent + " \"destination\": \"%s\",\n" % self.dest.name) if dest and self.dest else ""
if depst or deptime or deppf or currdep:
dep = " " * indent + " \"departure\": {\n"