diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 246598c1c3816148281e541abb7f4cde1bce1d72..8c0df302157a6fca1a4ca4a64eb2cecee6026333 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -317,6 +317,7 @@ class TelSelections tel, customer.customer_id, @bandwidth_account_id ) db.exec_defer("DELETE FROM tel_inventory WHERE tel = $1", [tel]) + .then { |r| raise unless r.cmd_tuples.positive? } end end end