mirror of
https://github.com/rommapp/romm.git
synced 2026-06-28 14:56:01 +00:00
Merge pull request #1157 from rommapp/romm-1154
[ROMM-1154] Fix setting main sibling
This commit is contained in:
@@ -227,13 +227,13 @@ class DBRomsHandler(DBBaseHandler):
|
||||
rom_user = self.get_rom_user_by_id(id)
|
||||
|
||||
if data["is_main_sibling"]:
|
||||
rom = self.get_rom(rom_user.rom_id)
|
||||
|
||||
session.execute(
|
||||
update(RomUser)
|
||||
.where(
|
||||
and_(
|
||||
RomUser.rom_id.in_(
|
||||
[rom.id for rom in rom_user.rom.get_sibling_roms()]
|
||||
),
|
||||
RomUser.rom_id.in_(r.id for r in rom.sibling_roms),
|
||||
RomUser.user_id == rom_user.user_id,
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user