mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Link.set_content: restrict to promoted links.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user