Skip to content

Commit

Permalink
call method differently. #229
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Apr 10, 2019
1 parent 8910ecb commit 90a6b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/providers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ def totals


# don't delete, but set deleted_at timestamp
# a provider with clients or prefixes can't be deleted
# a provider with active clients or with prefixes can't be deleted
def destroy
logger = Logger.new(STDOUT)
if @provider.active_client_count > 0
if active_client_count(provider_id: @provider.symbol) > 0
message = "Can't delete provider that has active clients."
status = 400
logger.warn message
Expand Down

0 comments on commit 90a6b81

Please sign in to comment.