diff options
-rw-r--r-- | main.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main.py b/main.py index 48d09ed..736d112 100644 --- a/main.py +++ b/main.py @@ -467,10 +467,10 @@ async def handler(websocket): incr = -1 for j in data["replies"]: incr += 1 - data = db.acc.get_author(j["author"]) - if type(data) != dict: - data = {} - data["replies"][incr]["author"] = data + reply_author = db.acc.get_author(j["author"]) + if type(reply_author) != dict: + reply_author = {} + data["replies"][incr]["author"] = reply_author broadcast(clients, json.dumps({ "command": "new_post", "data": data |