Turn media.get_uploader into a property
sqlalchemy gives autoloading (hopefully caching) link to other objects as properties. So turn get_uploader on the current mongo based stuff into a property to ease transition.
This commit is contained in:
@@ -173,7 +173,7 @@ def media_confirm_delete(request, media):
|
||||
|
||||
if request.method == 'POST' and form.validate():
|
||||
if form.confirm.data is True:
|
||||
username = media.get_uploader().username
|
||||
username = media.get_uploader.username
|
||||
|
||||
# Delete all files on the public storage
|
||||
delete_media_files(media)
|
||||
|
||||
Reference in New Issue
Block a user