Refactoring code for modular approach

This commit is contained in:
2025-09-11 22:06:10 +02:00
parent f9ed3bdf11
commit 6507b74191
3 changed files with 22 additions and 21 deletions

View File

@@ -39,7 +39,8 @@ class MarketplaceService:
status="pending",
source_url=request.url,
marketplace=request.marketplace,
shop_code=request.shop_code,
shop_id=shop.id, # Foreign key to shops table
shop_name=shop.shop_name, # Use shop.shop_name (the display name)
user_id=user.id,
created_at=datetime.utcnow()
)
@@ -49,7 +50,7 @@ class MarketplaceService:
db.refresh(import_job)
logger.info(
f"Created marketplace import job {import_job.id}: {request.marketplace} -> {request.shop_code} by user {user.username}")
f"Created marketplace import job {import_job.id}: {request.marketplace} -> {shop.shop_name} (shop_code: {shop.shop_code}) by user {user.username}")
return import_job