fix: update account profile (#25150)
This commit is contained in:
parent
fb307ae128
commit
d36ce782b7
1 changed files with 1 additions and 0 deletions
|
|
@ -351,6 +351,7 @@ class AccountService:
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def update_account(account, **kwargs):
|
def update_account(account, **kwargs):
|
||||||
"""Update account fields"""
|
"""Update account fields"""
|
||||||
|
account = db.session.merge(account)
|
||||||
for field, value in kwargs.items():
|
for field, value in kwargs.items():
|
||||||
if hasattr(account, field):
|
if hasattr(account, field):
|
||||||
setattr(account, field, value)
|
setattr(account, field, value)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue