From 120931dc4c1c827224c65f89a36e9d03d25491e8 Mon Sep 17 00:00:00 2001 From: Raphael Maenle Date: Wed, 27 May 2020 20:45:19 +0200 Subject: [PATCH] updated removal process for database elements --- server/routes.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/routes.py b/server/routes.py index e365053..820dfc6 100644 --- a/server/routes.py +++ b/server/routes.py @@ -108,6 +108,12 @@ def deleteAccount(): # TODO fix google delete account google.deleteAccount(current_user) + for cal in current_user.calendars: + db.session.delete(cal) + for dev in current_user.devices: + db.session.delete(dev) + + db.session.delete(current_user.google_token) db.session.delete(current_user) db.session.commit() logout_user()