mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-09 14:42:24 -05:00
Refactor set_inbound_number_for_service
As don't need the check for available inbound numbers
This commit is contained in:
@@ -39,9 +39,6 @@ def get_inbound_number_for_service(service_id):
|
||||
|
||||
@inbound_number_blueprint.route('/<uuid:inbound_number_id>/service/<uuid:service_id>', methods=['POST'])
|
||||
def post_set_inbound_number_for_service(inbound_number_id, service_id):
|
||||
if len(dao_get_available_inbound_numbers()) == 0:
|
||||
raise InvalidRequest('No inbound numbers available', status_code=400)
|
||||
|
||||
inbound_number = dao_get_inbound_number_for_service(service_id)
|
||||
if inbound_number:
|
||||
raise InvalidRequest('Service already has an inbound number', status_code=400)
|
||||
|
||||
Reference in New Issue
Block a user