From d7f35f6fbea8192374b1cc7e81d75ee690d0c705 Mon Sep 17 00:00:00 2001 From: Jessica Tallon Date: Fri, 31 Jul 2015 13:45:52 +0200 Subject: Add the user models to the MODELS list This adds the two new user models (LocalUser and RemoteUser) to the MODELS list that is in models.py. This stops the strange bug that occurs if you migrate a fresh database, the two models don't exist however migrating an existing database would create them as the migrations exist. --- mediagoblin/edit/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mediagoblin/edit') diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py index 224b93de..af0d0e9b 100644 --- a/mediagoblin/edit/views.py +++ b/mediagoblin/edit/views.py @@ -314,7 +314,8 @@ def delete_account(request): request.session.delete() # Delete user account and all related media files etc.... - request.user.delete() + user = User.query.filter(User.id==user.id).first() + user.delete() # We should send a message that the user has been deleted # successfully. But we just deleted the session, so we -- cgit v1.2.3