mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2025-01-08 11:25:40 +00:00
set user object id after created
This commit is contained in:
parent
8e58999f5a
commit
4a3c4b53cc
@ -268,6 +268,7 @@ class User(db.Model):
|
|||||||
user = User(username=self.username, firstname=self.firstname, lastname=self.lastname, role_id=self.role_id, email=self.email, password=self.get_hashed_password(self.plain_text_password))
|
user = User(username=self.username, firstname=self.firstname, lastname=self.lastname, role_id=self.role_id, email=self.email, password=self.get_hashed_password(self.plain_text_password))
|
||||||
db.session.add(user)
|
db.session.add(user)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
self.id = user.id
|
||||||
return True
|
return True
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
raise
|
raise
|
||||||
|
Loading…
Reference in New Issue
Block a user