Compare commits
No commits in common. "722db5feae27808b6beb64c3afc7eceef0d77db9" and "d17a76f4b8a7cd3ff59d648fe772d41c0fd69421" have entirely different histories.
722db5feae
...
d17a76f4b8
@ -14,9 +14,9 @@ class User(UserMixin, db.Model):
|
||||
email = db.Column(db.String(120), index=True, unique=True)
|
||||
profile_pic = db.Column(db.String(256))
|
||||
password_hash = db.Column(db.String(128))
|
||||
google_token = db.relationship('GoogleToken', uselist=False, backref = 'user', cascade="all, delete-orphan")
|
||||
calendars = db.relationship('Calendar', backref='user', lazy=True, cascade="all, delete-orphan")
|
||||
devices = db.relationship('Device', backref='user', cascade="all, delete-orphan")
|
||||
google_token = db.relationship('GoogleToken', uselist=False, backref = 'user')
|
||||
calendars = db.relationship('Calendar', backref='user', lazy=True)
|
||||
devices = db.relationship('Device', backref='user')
|
||||
|
||||
def __repr__(self):
|
||||
return '<User {}>'.format(self.username)
|
||||
|
@ -107,13 +107,7 @@ def deleteAccount():
|
||||
return redirect(url_for('account'))
|
||||
# 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()
|
||||
|
Loading…
Reference in New Issue
Block a user