Skip to content

Commit

Permalink
change to id
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex committed Sep 6, 2023
1 parent c012813 commit f1ee871
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions backend/zeno_backend/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,13 @@ def add_folder(project: str, name: str):
dependencies=[Depends(auth)],
)
def add_slice(project: str, req: Slice):
res = insert.slice(project, req)
if res is None:
id = insert.slice(project, req)
if id is None:
raise HTTPException(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Failed to insert slice",
)
return res
return id

@api_app.post(
"/chart/{project}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
function removeSlice() {
ZenoService.deleteSlice(slice).then(() => {
invalidateAll();
slices.update((s) => s.filter((sli) => sli.sliceName !== slice.sliceName));
slices.update((s) => s.filter((sli) => sli.id !== slice.id));
created = false;
});
}
Expand Down

0 comments on commit f1ee871

Please sign in to comment.