We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00d171a commit 290b023Copy full SHA for 290b023
1 file changed
pgweb/util/socialposter.py
@@ -83,7 +83,7 @@ def set_pin(self, postid):
83
if r2.status_code != 200:
84
print("Failed to unpin from mastodon: {}".format(r2.text))
85
86
- if not found:
+ if not found and postid is not None:
87
# Not already pinned, so pin!
88
r2 = requests.post(
89
'{}/api/v1/statuses/{}/pin'.format(self.settings.MASTODON_BASEURL, postid),
0 commit comments