From 11995eccb40deb02403d4be67f20759ee69f0e17 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 30 Apr 2023 11:12:52 +0100 Subject: [PATCH] Fix tests --- inbox.py | 6 ++++-- webapp_post.py | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/inbox.py b/inbox.py index 60bd4788e..f54625682 100644 --- a/inbox.py +++ b/inbox.py @@ -262,9 +262,11 @@ def _store_last_post_id(base_dir: str, nickname: str, domain: str, post_id = remove_id_ending(post_json_object['id']) if not actor: return - lastpost_dir = acct_dir(base_dir, nickname, domain) + '/lastpost' + account_dir = acct_dir(base_dir, nickname, domain) + lastpost_dir = account_dir + '/lastpost' if not os.path.isdir(lastpost_dir): - os.mkdir(lastpost_dir) + if os.path.isdir(account_dir): + os.mkdir(lastpost_dir) actor_filename = lastpost_dir + '/' + actor.replace('/', '#') try: with open(actor_filename, 'w+', encoding='utf-8') as fp_actor: diff --git a/webapp_post.py b/webapp_post.py index c40c34ad7..e2dd3efdb 100644 --- a/webapp_post.py +++ b/webapp_post.py @@ -891,9 +891,12 @@ def _get_like_icon_html(nickname: str, domain_full: str, '/users/' + nickname + '?likers=' + likers_post_id # show the number of likes next to icon + show_liked_str = 'Show who liked this post' + if translate.get(show_liked_str): + show_liked_str = translate[show_liked_str] like_str += '\n'