Closed dragon-fire-fly closed 1 year ago
This bug was caused by using the incorrect related name
from the models.ForeignKey()
field. The name should be "profile_pic", not "profile_picture.
Buggy code:
Fixed code:
Successfully deleted profile after fix:
Describe the bug When the delete profile button is pressed, an
AttributeError
is thrown. " 'User' object has no attribute 'profile_picture' "To Reproduce Steps to reproduce the behavior:
Expected behavior The user account should be deleted and the user redirected to the home page with a successful deletion message.
Screenshots
Desktop (please complete the following information):