Skip to content

Commit 87a6985

Browse files
Filter ABL on REX consumer by default
1 parent 103c49a commit 87a6985

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

backend/app/app/api/endpoints/abl.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ async def get_abl_info(
2626
version: Optional[str] = None,
2727
code_version: Optional[str] = None,
2828
):
29+
if consumer is None:
30+
consumer = "REX"
31+
elif consumer == "ANY":
32+
consumer = None
2933
return abl_service.get_abl_info_database(
3034
db, consumer, repo_name, version, code_version
3135
)

frontend/specs/abl.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe("fetchABL", () => {
194194
const url = fetchSpy.mock.lastCall?.[0];
195195
expect(fetchSpy).toHaveBeenCalledTimes(1);
196196
expect(errors[0]).toBeUndefined();
197-
expect(url).toBe("/api/abl/");
197+
expect(url).toBe("/api/abl/?consumer=ANY");
198198
expect(value).toStrictEqual([]);
199199
});
200200
it("sends errors to error store", async () => {

frontend/src/ts/abl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function getLatestCodeVersionForJob(
6868
export async function fetchABL(): Promise<ApprovedBookWithDate[]> {
6969
let abl: ApprovedBookWithDate[];
7070
try {
71-
abl = await RequireAuth.fetchJson("/api/abl/");
71+
abl = await RequireAuth.fetchJson("/api/abl/?consumer=ANY");
7272
} catch (error) {
7373
handleError(error);
7474
abl = [];

0 commit comments

Comments
 (0)