pull/17/head
kthouky 2023-08-08 12:53:23 +02:00
parent 58e2f0e3df
commit 69d379934b
1 changed files with 3 additions and 3 deletions

View File

@ -71,13 +71,13 @@ def get_all_censured_instances_by_censuring_id(censuring_ids):
).options( ).options(
joinedload(Instance.endorsements), joinedload(Instance.endorsements),
).filter( ).filter(
Censure.approving_id.in_(censuring_ids) Censure.censuring_id.in_(censuring_ids)
).group_by( ).group_by(
Instance.id Instance.id
) )
return query.all() return query.all()
def get_all_censuring_instances_by_censured_id(censured_ids): def get_all_censuring_instances_by_censured_id(censured_id):
query = db.session.query( query = db.session.query(
Instance Instance
).outerjoin( ).outerjoin(
@ -85,7 +85,7 @@ def get_all_censuring_instances_by_censured_id(censured_ids):
).options( ).options(
joinedload(Instance.approvals), joinedload(Instance.approvals),
).filter( ).filter(
Censure.endorsed_id.in_(censured_ids) Censure.censured_id == censured_id
).group_by( ).group_by(
Instance.id Instance.id
) )