fgix
parent
58e2f0e3df
commit
69d379934b
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue