super_user and services updated

This commit is contained in:
2024-12-05 18:59:46 +03:00
parent 88f94c37c2
commit 88309eb49d
20 changed files with 317 additions and 116 deletions

View File

@@ -186,15 +186,9 @@ class BuildingLivingSpacesPartsCreateEventMethods(MethodToEvent):
)
last_living_space.save()
user_module = Modules.filter_one(
Modules.module_code == "USR-PUB", system=True
).data
created_living_space.save()
created_living_space.update(is_confirmed=True)
created_living_space.save()
ModulesBindOccupantEventMethods.modules_bind_occupant_system(
created_living_space.save_and_confirm()
ModulesBindOccupantEventMethods.bind_default_module_for_first_init_occupant(
build_living_space_id=created_living_space.id,
modules_id=user_module.id,
)
return created_living_space