diff options
author | Jessica Tallon <tsyesika@tsyesika.se> | 2015-07-31 13:45:52 +0200 |
---|---|---|
committer | Jessica Tallon <tsyesika@tsyesika.se> | 2015-07-31 15:15:24 +0200 |
commit | d7f35f6fbea8192374b1cc7e81d75ee690d0c705 (patch) | |
tree | b45bcf00330b3ba3fe43d8f260e4f7b6a4503680 /mediagoblin/edit | |
parent | d88fcb03e2e520da6a7d0203d660e4536108f56b (diff) | |
download | mediagoblin-d7f35f6fbea8192374b1cc7e81d75ee690d0c705.tar.lz mediagoblin-d7f35f6fbea8192374b1cc7e81d75ee690d0c705.tar.xz mediagoblin-d7f35f6fbea8192374b1cc7e81d75ee690d0c705.zip |
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.
Diffstat (limited to 'mediagoblin/edit')
-rw-r--r-- | mediagoblin/edit/views.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |