Fix: use incorrect model to access profile picture path (#1760)
(cherry picked from commit e875f1dd40fe726f6e83aaa833f65eb9e10f7e94) Co-authored-by: Adrià Casajús <adria.casajus@proton.ch>
This commit is contained in:
parent
85964f283e
commit
ff33392398
|
@ -206,7 +206,7 @@ def setting():
|
|||
current_profile_file is not None
|
||||
and current_profile_file.user_id == current_user.id
|
||||
):
|
||||
s3.delete(current_user.path)
|
||||
s3.delete(current_profile_file.path)
|
||||
|
||||
file_path = random_string(30)
|
||||
file = File.create(user_id=current_user.id, path=file_path)
|
||||
|
|
Loading…
Reference in a new issue