mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-12 19:38:57 +00:00
Merge remote-tracking branch 'origin/3.0' into rbac
This commit is contained in:
commit
e9b9884ee3
@ -79,7 +79,10 @@ class ComputesRepository(BaseRepository):
|
||||
if password:
|
||||
update_values["password"] = password.get_secret_value()
|
||||
|
||||
query = update(models.Compute).where(models.Compute.compute_id == compute_id).values(update_values)
|
||||
query = update(models.Compute).\
|
||||
where(models.Compute.compute_id == compute_id).\
|
||||
values(update_values).\
|
||||
execution_options(synchronize_session="fetch")
|
||||
|
||||
await self._db_session.execute(query)
|
||||
await self._db_session.commit()
|
||||
|
@ -70,7 +70,10 @@ class TemplatesRepository(BaseRepository):
|
||||
|
||||
update_values = template_update.dict(exclude_unset=True)
|
||||
|
||||
query = update(models.Template).where(models.Template.template_id == template_id).values(update_values)
|
||||
query = not update(models.Template). \
|
||||
where(models.Template.template_id == template_id). \
|
||||
values(update_values).\
|
||||
execution_options(synchronize_session="fetch")
|
||||
|
||||
await self._db_session.execute(query)
|
||||
await self._db_session.commit()
|
||||
|
@ -102,7 +102,10 @@ class UsersRepository(BaseRepository):
|
||||
if password:
|
||||
update_values["hashed_password"] = self._auth_service.hash_password(password=password.get_secret_value())
|
||||
|
||||
query = update(models.User).where(models.User.user_id == user_id).values(update_values)
|
||||
query = update(models.User).\
|
||||
where(models.User.user_id == user_id).\
|
||||
values(update_values).\
|
||||
execution_options(synchronize_session="fetch")
|
||||
|
||||
await self._db_session.execute(query)
|
||||
await self._db_session.commit()
|
||||
@ -197,7 +200,10 @@ class UsersRepository(BaseRepository):
|
||||
"""
|
||||
|
||||
update_values = user_group_update.dict(exclude_unset=True)
|
||||
query = update(models.UserGroup).where(models.UserGroup.user_group_id == user_group_id).values(update_values)
|
||||
query = update(models.UserGroup).\
|
||||
where(models.UserGroup.user_group_id == user_group_id).\
|
||||
values(update_values).\
|
||||
execution_options(synchronize_session="fetch")
|
||||
|
||||
await self._db_session.execute(query)
|
||||
await self._db_session.commit()
|
||||
|
@ -1,16 +1,16 @@
|
||||
uvicorn==0.13.4
|
||||
fastapi==0.64.0
|
||||
websockets==9.0.1
|
||||
fastapi==0.65.1
|
||||
websockets==9.1
|
||||
python-multipart==0.0.5
|
||||
aiohttp==3.7.4.post0
|
||||
aiofiles==0.6.0
|
||||
Jinja2==2.11.3
|
||||
aiofiles==0.7.0
|
||||
Jinja2==3.0.1
|
||||
sentry-sdk==1.1.0
|
||||
psutil==5.8.0
|
||||
async-timeout==3.0.1
|
||||
distro==1.5.0
|
||||
py-cpuinfo==8.0.0
|
||||
sqlalchemy==1.4.14
|
||||
sqlalchemy==1.4.17
|
||||
aiosqlite===0.17.0
|
||||
passlib[bcrypt]==1.7.4
|
||||
python-jose==3.2.0
|
||||
|
Loading…
Reference in New Issue
Block a user