diff --git a/etebase_fastapi/collection.py b/etebase_fastapi/collection.py index 9e25b38..14abee9 100644 --- a/etebase_fastapi/collection.py +++ b/etebase_fastapi/collection.py @@ -534,14 +534,20 @@ def fetch_updates( @item_router.post("/item/transaction/", dependencies=[Depends(has_write_access), *PERMISSIONS_READWRITE]) def item_transaction( - collection_uid: str, data: ItemBatchIn, stoken: t.Optional[str] = None, user: UserType = Depends(get_authenticated_user) + collection_uid: str, + data: ItemBatchIn, + stoken: t.Optional[str] = None, + user: UserType = Depends(get_authenticated_user), ): return item_bulk_common(data, user, stoken, collection_uid, validate_etag=True) @item_router.post("/item/batch/", dependencies=[Depends(has_write_access), *PERMISSIONS_READWRITE]) def item_batch( - collection_uid: str, data: ItemBatchIn, stoken: t.Optional[str] = None, user: UserType = Depends(get_authenticated_user) + collection_uid: str, + data: ItemBatchIn, + stoken: t.Optional[str] = None, + user: UserType = Depends(get_authenticated_user), ): return item_bulk_common(data, user, stoken, collection_uid, validate_etag=False) diff --git a/etebase_fastapi/sendfile/utils.py b/etebase_fastapi/sendfile/utils.py index 7c8b1f2..c35d6df 100644 --- a/etebase_fastapi/sendfile/utils.py +++ b/etebase_fastapi/sendfile/utils.py @@ -56,7 +56,9 @@ def _sanitize_path(filepath): try: filepath_abs.relative_to(path_root) except ValueError: - raise HttpError("generic", "{} wrt {} is impossible".format(filepath_abs, path_root), status_code=status.HTTP_404_NOT_FOUND) + raise HttpError( + "generic", "{} wrt {} is impossible".format(filepath_abs, path_root), status_code=status.HTTP_404_NOT_FOUND + ) return filepath_abs