mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-08 22:50:26 +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))
|
||||
db.session.add(user)
|
||||
db.session.commit()
|
||||
self.id = user.id
|
||||
return True
|
||||
except Exception, e:
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user