Browse Source

Remove unused Topic.type_for_display property

merge-requests/85/head
Deimos 5 years ago
parent
commit
cb0a683dd9
  1. 10
      tildes/tildes/models/topic/topic.py

10
tildes/tildes/models/topic/topic.py

@ -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)."""

Loading…
Cancel
Save