change-role-fix: обновленное значение ссп при смене роли
This commit is contained in:
parent
14d2271eb9
commit
7d34376abe
@ -167,7 +167,7 @@ class UserRepository:
|
||||
),
|
||||
{"user_id": user_id, "org_unit_ids": org_unit_ids},
|
||||
)
|
||||
await self.db.commit()
|
||||
await self.db.flush()
|
||||
|
||||
async def create(self, user_data: dict) -> AppUser:
|
||||
hashed_password = (
|
||||
|
||||
@ -112,6 +112,7 @@ class UserService:
|
||||
if (had_many_ssp_role and not has_many_ssp_role_now) or is_executor_to_dfip_transition:
|
||||
await self.user_repo.clear_many_ssp(user_id)
|
||||
if user_data.load_orgs:
|
||||
self.db.expire(updated)
|
||||
updated = await self.user_repo.get(
|
||||
user_id=user_id,
|
||||
load_orgs=user_data.load_orgs,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user