Fix bug with empty description
This commit is contained in:
@@ -39,7 +39,11 @@ class Task(AsanaObject):
|
|||||||
parser = HTMLTextParser()
|
parser = HTMLTextParser()
|
||||||
parser.feed(self.object_dict['html_notes'])
|
parser.feed(self.object_dict['html_notes'])
|
||||||
parser.close()
|
parser.close()
|
||||||
return parser.get_formatted_text()
|
text = parser.get_formatted_text()
|
||||||
|
if (len(text) > 0):
|
||||||
|
return text
|
||||||
|
else:
|
||||||
|
return ""
|
||||||
elif 'notes' in self.object_dict:
|
elif 'notes' in self.object_dict:
|
||||||
return self.object_dict['notes']
|
return self.object_dict['notes']
|
||||||
else:
|
else:
|
||||||
@@ -166,7 +170,6 @@ class HTMLTextParser(HTMLParser):
|
|||||||
|
|
||||||
def get_formatted_text(self):
|
def get_formatted_text(self):
|
||||||
formatted = [t.text_format() for t in self.text]
|
formatted = [t.text_format() for t in self.text]
|
||||||
print(formatted, file=sys.stderr)
|
|
||||||
return formatted
|
return formatted
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ class MyTasks(object):
|
|||||||
] + [TaskRow(t, self.callback) for t in self.today] + [
|
] + [TaskRow(t, self.callback) for t in self.today] + [
|
||||||
urwid.Text(('atm_section', 'Upcoming'))
|
urwid.Text(('atm_section', 'Upcoming'))
|
||||||
] + [TaskRow(t, self.callback) for t in self.upcoming] + [
|
] + [TaskRow(t, self.callback) for t in self.upcoming] + [
|
||||||
urwid.Text(('atm_section', 'Upcoming'))
|
urwid.Text(('atm_section', 'Later'))
|
||||||
] + [TaskRow(t, self.callback) for t in self.later]
|
] + [TaskRow(t, self.callback) for t in self.later]
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user