/cdn.vox-cdn.com/uploads/chorus_image/image/51987651/Amazon_20One.0.jpeg)
Amazon averted a potential holiday nightmare when a judge ruled today that pilots who carry the online retailer’s cargo had to end a strike and return to work.
Pilots at the cargo airline ABX Air, in whose parent company Amazon owns a stake, had been striking due to what they consider understaffing. The “staffing crisis,” they said, results in frequent “emergency” flight assignments that pull them away from family to meet demand from customers like Amazon.
But a federal judge in Ohio ruled that the pilots, who are part of a union, have to settle the dispute with their employer through other means.
An Amazon spokesperson said the online retailer had found workarounds during the strike. But a prolonged strike during Black Friday weekend could have caused further problems.
Amazon has been taking more control over the movement of its packages once they leave its warehouses in an effort to cut costs over the long term and make sure it has the shipping capacity to meet demand when partners like UPS and FedEx don’t. In August, the company unveiled the first “Prime Air” Plane, one of 40 Amazon is leasing from ABX’s parent company and another cargo airliner over the next two years.
This article originally appeared on Recode.net.