refactor
This commit is contained in:
@@ -117,19 +117,15 @@ async def create_placements(
|
||||
status=channel_input.status or domain.PlacementStatus.PLANNED,
|
||||
comment=channel_input.comment,
|
||||
# Приоритет: channel details > общие details
|
||||
placement_at=(channel_details.placement_at if channel_details else None) or (
|
||||
details.placement_at if details else None
|
||||
),
|
||||
placement_at=(channel_details.placement_at if channel_details else None)
|
||||
or (details.placement_at if details else None),
|
||||
payment_at=details.payment_at if details else None,
|
||||
cost_type=(channel_details.cost.type if channel_details and channel_details.cost else None) or (
|
||||
details.cost.type if details and details.cost else None
|
||||
),
|
||||
cost_value=(channel_details.cost.value if channel_details and channel_details.cost else None) or (
|
||||
details.cost.value if details and details.cost else None
|
||||
),
|
||||
cost_before_bargain=(channel_details.cost_before_bargain if channel_details else None) or (
|
||||
details.cost_before_bargain if details else None
|
||||
),
|
||||
cost_type=(channel_details.cost.type if channel_details and channel_details.cost else None)
|
||||
or (details.cost.type if details and details.cost else None),
|
||||
cost_value=(channel_details.cost.value if channel_details and channel_details.cost else None)
|
||||
or (details.cost.value if details and details.cost else None),
|
||||
cost_before_bargain=(channel_details.cost_before_bargain if channel_details else None)
|
||||
or (details.cost_before_bargain if details else None),
|
||||
placement_type=details.placement_type if details else None,
|
||||
format=(channel_details.format if channel_details else None) or (details.format if details else None),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user