mirror of
https://github.com/Pennyw0rth/NetExec
synced 2026-06-06 16:34:30 +00:00
feat(cmedb): update is_group_valid to use proper sqlalchemy syntax
This commit is contained in:
@@ -742,11 +742,10 @@ class database:
|
||||
"""
|
||||
Check if this group ID is valid.
|
||||
"""
|
||||
results = self.conn.query(self.GroupsTable).filter(
|
||||
q = select(self.GroupsTable).filter(
|
||||
self.GroupsTable.c.id == group_id
|
||||
).first()
|
||||
self.conn.commit()
|
||||
self.conn.close()
|
||||
)
|
||||
results = asyncio.run(self.conn.execute(q)).first()
|
||||
|
||||
valid = True if results else False
|
||||
logging.debug(f"is_group_valid(groupID={group_id}) => {valid}")
|
||||
|
||||
Reference in New Issue
Block a user