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:
Adrià Casajús 2023-05-31 17:21:30 +02:00 committed by GitHub
parent 85964f283e
commit ff33392398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)