|
@ -355,16 +355,6 @@ class Topic(DatabaseModel): |
|
|
"""Return whether this is a link topic.""" |
|
|
"""Return whether this is a link topic.""" |
|
|
return self.topic_type is TopicType.LINK |
|
|
return self.topic_type is TopicType.LINK |
|
|
|
|
|
|
|
|
@property |
|
|
|
|
|
def type_for_display(self) -> str: |
|
|
|
|
|
"""Return a string of the topic's type, suitable for display.""" |
|
|
|
|
|
if self.is_text_type: |
|
|
|
|
|
return "Text" |
|
|
|
|
|
elif self.is_link_type: |
|
|
|
|
|
return "Link" |
|
|
|
|
|
|
|
|
|
|
|
return "Topic" |
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def link_domain(self) -> str: |
|
|
def link_domain(self) -> str: |
|
|
"""Return the link's domain (for link topics only).""" |
|
|
"""Return the link's domain (for link topics only).""" |
|
|