diff --git a/app/jobs/reverse_geocoding_job.rb b/app/jobs/reverse_geocoding_job.rb
index 9be6c505..02c56e23 100644
--- a/app/jobs/reverse_geocoding_job.rb
+++ b/app/jobs/reverse_geocoding_job.rb
@@ -2,6 +2,8 @@ class ReverseGeocodingJob < ApplicationJob
queue_as :low
def perform(point_id)
+ return unless REVERSE_GEOCODING_ENABLED
+
point = Point.find(point_id)
return if point.city.present? && point.country.present?
diff --git a/app/views/stats/_stat.html.erb b/app/views/stats/_stat.html.erb
index c3b946a4..9f7ba4e4 100644
--- a/app/views/stats/_stat.html.erb
+++ b/app/views/stats/_stat.html.erb
@@ -6,8 +6,10 @@
<% end %>
- <%= stat.toponyms.count %> countries, <%= stat.toponyms.sum { _1['cities'].count } %> cities
-
+ <% if REVERSE_GEOCODING_ENABLED %>
+
+ <%= stat.toponyms.count %> countries, <%= stat.toponyms.sum { _1['cities'].count } %> cities
+
+ <% end %>
diff --git a/app/views/stats/index.html.erb b/app/views/stats/index.html.erb
index 09de4919..0a2c3990 100644
--- a/app/views/stats/index.html.erb
+++ b/app/views/stats/index.html.erb
@@ -7,20 +7,21 @@
-
- <%= current_user.total_countries %>
+ <% if REVERSE_GEOCODING_ENABLED %>
+
+
+ <%= current_user.total_countries %>
+
+
Countries visited
-
Countries visited
-
-
-
- <%= current_user.total_cities %>
+
+
+ <%= current_user.total_cities %>
+
+
Cities visited
-
Cities visited
-
-
+ <% end %>
<% @stats.each do |year, stats| %>