Skip to content

Commit

Permalink
fix: changed the way to cast boolean to int in cte
Browse files Browse the repository at this point in the history
  • Loading branch information
jij1949 committed Feb 6, 2024
1 parent bbbf5fe commit d982443
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions querybook/server/logic/generic_permission.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import List, Optional, Tuple, Union
from app.db import with_session
from models import UserGroupMember, User, DataDocEditor, BoardEditor
from sqlalchemy import func, select
from sqlalchemy import func, select, Integer
from sqlalchemy.orm import Session
from const.permissions import Permission

Expand Down Expand Up @@ -62,10 +62,10 @@ def get_all_groups_and_group_members_with_access(
func.max(editors.c.id),
editors.c.uid,
func.max(
editors.c.read.Integer
editors.c.read.cast(Integer)
), # Get the most permissive read permissions
func.max(
editors.c.write.Integer
editors.c.write.cast(Integer)
), # Get the most permissive write permissions
]
).group_by(editors.c.uid)
Expand Down

0 comments on commit d982443

Please sign in to comment.