chore: format

This commit is contained in:
Timothy Jaeryang Baek
2024-11-18 06:39:27 -08:00
parent ccdafa8718
commit 8ad1aa3c2e
48 changed files with 144 additions and 49 deletions

View File

@@ -128,8 +128,12 @@ class GroupTable:
return [
GroupModel.model_validate(group)
for group in db.query(Group)
.filter(func.json_array_length(Group.user_ids) > 0) # Ensure array exists
.filter(Group.user_ids.cast(String).like(f'%"{user_id}"%')) # String-based check
.filter(
func.json_array_length(Group.user_ids) > 0
) # Ensure array exists
.filter(
Group.user_ids.cast(String).like(f'%"{user_id}"%')
) # String-based check
.order_by(Group.updated_at.desc())
.all()
]