From 87996ece06f32d0779111e323f2f1ac51e2b3205 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 12 May 2015 11:28:35 +0200 Subject: [PATCH] Whoops. --- app/models/license.rb | 2 +- app/views/admin/licenses/show.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/license.rb b/app/models/license.rb index 0b2e05e2a6..f272b965f5 100644 --- a/app/models/license.rb +++ b/app/models/license.rb @@ -96,7 +96,7 @@ class License < ActiveRecord::Base return unless self.license? && self.restricted?(:active_user_count) restricted_user_count = self.restrictions[:active_user_count] - active_user_count = 1050;User.active.count + active_user_count = User.active.count historical_active_user_count = HistoricalData.maximum(:active_user_count) || 0 max_active_user_count = [active_user_count, historical_active_user_count].max diff --git a/app/views/admin/licenses/show.html.haml b/app/views/admin/licenses/show.html.haml index f8f3cf4c70..fa07fc463d 100644 --- a/app/views/admin/licenses/show.html.haml +++ b/app/views/admin/licenses/show.html.haml @@ -65,7 +65,7 @@ %strong Exceeds license limit - - historical = 1050;HistoricalData.maximum(:active_user_count) + - historical = HistoricalData.maximum(:active_user_count) - if historical %li %span.light Maximum active users: