Fix crash on member listing with member without description

This commit is contained in:
Ske 2019-03-23 17:42:18 +01:00
parent 0266db5589
commit c0718a1516

View File

@ -244,6 +244,7 @@ def member_list(system: System, all_members: List[Member], current_page: int, pa
member_description += "**Birthday:** {}\n".format(member.birthday_string()) member_description += "**Birthday:** {}\n".format(member.birthday_string())
if member.pronouns: if member.pronouns:
member_description += "**Pronouns:** {}\n".format(member.pronouns) member_description += "**Pronouns:** {}\n".format(member.pronouns)
if member.description:
if len(member.description) > 512: if len(member.description) > 512:
member_description += "\n" + truncate_description_list(member.description) + "\n" + "Type `pk;member {}` for full description.".format(member.hid) member_description += "\n" + truncate_description_list(member.description) + "\n" + "Type `pk;member {}` for full description.".format(member.hid)
else: else: