Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

make sure empty lists are also json encoded #93

Merged
merged 1 commit into from
May 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion slacker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def command(self, channel, command, text):
def update(self, channel, ts, text, attachments=None, parse=None,
link_names=False, as_user=None):
# Ensure attachments are json encoded
if attachments and isinstance(attachments, list):
if attachments is not None and isinstance(attachments, list):
attachments = json.dumps(attachments)
return self.post('chat.update',
data={
Expand Down