File tree Expand file tree Collapse file tree
schemas/v1/transfers/file Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66from syncmaster .backend .api .v1 .connections import router as connection_router
77from syncmaster .backend .api .v1 .groups import router as group_router
88from syncmaster .backend .api .v1 .queue import router as queue_router
9- from syncmaster .backend .api .v1 .transfers . router import router as transfer_router
9+ from syncmaster .backend .api .v1 .transfers import router as transfer_router
1010from syncmaster .backend .api .v1 .users import router as user_router
1111
1212router = APIRouter (prefix = "/v1" )
Original file line number Diff line number Diff line change 66from kombu .exceptions import KombuError
77
88from syncmaster .backend .api .deps import UnitOfWorkMarker
9- from syncmaster .backend .api .v1 .transfers .utils import (
10- process_file_transfer_directory_path ,
11- )
129from syncmaster .backend .services import UnitOfWork , get_user
1310from syncmaster .db .models import Status , User
1411from syncmaster .db .utils import Permission
@@ -115,8 +112,6 @@ async def create_transfer(
115112 if transfer_data .group_id != queue .group_id :
116113 raise DifferentTransferAndQueueGroupError
117114
118- transfer_data = process_file_transfer_directory_path (transfer_data ) # type: ignore
119-
120115 async with unit_of_work :
121116 transfer = await unit_of_work .transfer .create (
122117 group_id = transfer_data .group_id ,
@@ -316,8 +311,6 @@ async def update_transfer(
316311 params_type = transfer_data .source_params .type ,
317312 )
318313
319- transfer_data = process_file_transfer_directory_path (transfer_data ) # type: ignore
320-
321314 async with unit_of_work :
322315 transfer = await unit_of_work .transfer .update (
323316 transfer = transfer ,
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ class ReadFileTransferTarget(BaseModel):
2828# At the moment the CreateTransferSourceParams and CreateTransferTargetParams
2929# classes are identical but may change in the future
3030class CreateFileTransferSource (BaseModel ):
31- directory_path : PurePosixPath
31+ directory_path : str
3232 file_format : CSV | JSONLine | JSON = Field (..., discriminator = "type" )
3333
3434 class Config :
@@ -38,7 +38,7 @@ class Config:
3838
3939
4040class CreateFileTransferTarget (BaseModel ):
41- directory_path : PurePosixPath
41+ directory_path : str
4242 file_format : CSV | JSONLine = Field (..., discriminator = "type" ) # JSON FORMAT IS NOT SUPPORTED AS A TARGET !
4343
4444 class Config :
You can’t perform that action at this time.
0 commit comments