- <TD><B>restrictions:</B></TD>
- <TD>'''
- if 'restrictionOne' in conditions:
- ret += f'''
- {conditions['restrictionOne']['travelDirectionName']}:
- {conditions['restrictionOne']['publicPage']}<BR>'''
- if 'restrictionTwo' in conditions:
- ret += f'''
- {conditions['restrictionTwo']['travelDirectionName']}:
- {conditions['restrictionTwo']['publicPage']}'''
- ret += '</TR></TABLE>'
+ <TD><FONT SIZE=+2><B>Restrictions:</B></FONT></TD>
+ <TD><FONT SIZE=+2>"""
+ count = 0
+ msg = conditions["restrictionOne"].get("publicPage", "no restrictions")
+ if msg.lower() != "no restrictions":
+ count += 1
+ msg = conditions["restrictionTwo"].get("publicPage", "no restrictions")
+ if msg.lower() != "no restrictions":
+ count += 1
+ if count == 2:
+ ret += f"""
+ <U>{conditions['restrictionOne']['travelDirectionName']}:</U>
+ {conditions['restrictionOne']['publicPage']} <BR>
+ <U>{conditions['restrictionTwo']['travelDirectionName']}:</U>
+ {conditions['restrictionTwo']['publicPage']}"""
+ elif count == 1:
+ msg = conditions["restrictionOne"].get("publicPage", "no restrictions")
+ if msg.lower() != "no restrictions":
+ ret += f"""
+ <U>{conditions['restrictionOne']['travelDirectionName']}:</U>
+ {conditions['restrictionOne']['publicPage']}<BR>"""
+ else:
+ ret += f"""
+ <U>{conditions['restrictionTwo']['travelDirectionName']}:</U>
+ {conditions['restrictionTwo']['publicPage']}<BR>"""
+ else:
+ ret += """None.<BR>"""
+ ret += "</FONT></TD></TR></TABLE>"