Fixed filename generation.
This commit is contained in:
parent
a9013d9673
commit
d5827b2006
@ -27,7 +27,7 @@ def generate_profile_image_filename(instance, filename):
|
||||
Returns filename as: explorer_pk-username.jpg
|
||||
"""
|
||||
|
||||
return 'explorers/' + str(instance.explorer.pk) + '-' + str(instance.explorer.username) + '.' + filename.split('.')[-1]
|
||||
return 'explorers/' + str(instance.user.pk) + '-' + str(instance.user.username) + '.' + filename.split('.')[-1]
|
||||
|
||||
class Explorer(models.Model):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user