Link.set_content: restrict to promoted links.

This commit is contained in:
Brian Simpson
2015-09-09 06:15:34 -04:00
parent 910056787a
commit fdd3e9a0b6

View File

@@ -245,6 +245,9 @@ class Link(Thing, Printable):
return l
def set_content(self, is_self, content):
if not self.promoted:
raise ValueError("set_content is only supported for promoted links")
was_self = self.is_self
self.is_self = is_self