From 62866896e56d1f4a184af14dd41e368bc3dd7dfe Mon Sep 17 00:00:00 2001 From: tata Date: Sat, 28 Oct 2023 22:59:44 +0200 Subject: [PATCH] For #73 :bug: in post top_img filepath --- src/core/utils/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/utils/base.py b/src/core/utils/base.py index 0dccd71..ef43680 100644 --- a/src/core/utils/base.py +++ b/src/core/utils/base.py @@ -30,7 +30,7 @@ def upload_img(instance, filepath): if klass == "profile": user_folder = f"profile_{instance.user.id}" return os.path.join("avatar", user_folder, new_file_name) - elif klass == "image": + elif klass == "post": folder = f"post_{date_trace}" return os.path.join("post", folder, new_file_name) elif klass == "category":