diff --git a/.DS_Store b/.DS_Store index b5024b4..e3862f2 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.dockerignore b/.dockerignore index 8631955..d82082c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -3,4 +3,6 @@ apiKey.csv Dockerfile .gitignore .DS_Store -.env \ No newline at end of file +.env +.venv/ +__pycache__/ \ No newline at end of file diff --git a/src/app/routers/api.py b/src/app/routers/api.py index fbba2bf..f5342ac 100644 --- a/src/app/routers/api.py +++ b/src/app/routers/api.py @@ -487,6 +487,15 @@ async def resend_post( logger.info("✅ Повторная отправка успешна") + singing = await Signing.getSigningByTrackingId(trackingId) + if singing.success and singing.data.deliveryType != deliveryType: + previousDeliveryType = singing.data.deliveryType + singing.data.deliveryType = deliveryType + await singing.data.save() + logger.info( + f"🔄 Обновлен тип доставки с {previousDeliveryType} на {deliveryType} для трек-номера {trackingId}" + ) + return {"status": "SUCCESS", "message": resendResult.get("message", "")} diff --git a/src/utils/__init__.py b/src/utils/__init__.py index 3f29eea..1b03377 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -6,6 +6,7 @@ from .attachment import * from .request_parser import RequestParser from .to_dict import * from .web import * +from .pdf_saver import * requestDict = RequestParser()