Skip to content

Commit f20832c

Browse files
authored
Merge pull request #6447 from keshavvinayak01/master
Fixed remove_search_analytics issue
2 parents c0a876b + 69eb08f commit f20832c

File tree

4 files changed

+3
-15
lines changed

4 files changed

+3
-15
lines changed

docs/guides/feature-flags.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,4 @@ e.g. python-reno release notes manager is known to do that
3535

3636
``USE_TESTING_BUILD_IMAGE``: :featureflags:`USE_TESTING_BUILD_IMAGE`
3737

38-
``EXTERNAL_VERSION_BUILD``: :featureflags:`EXTERNAL_VERSION_BUILD`
39-
40-
``SEARCH_ANALYTICS``: :featureflags:`SEARCH_ANALYTICS`
38+
``EXTERNAL_VERSION_BUILD``: :featureflags:`EXTERNAL_VERSION_BUILD`

readthedocs/projects/models.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -1480,7 +1480,6 @@ def add_features(sender, **kwargs):
14801480
EXTERNAL_VERSION_BUILD = 'external_version_build'
14811481
UPDATE_CONDA_STARTUP = 'update_conda_startup'
14821482
CONDA_APPEND_CORE_REQUIREMENTS = 'conda_append_core_requirements'
1483-
SEARCH_ANALYTICS = 'search_analytics'
14841483

14851484
FEATURES = (
14861485
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
@@ -1532,10 +1531,7 @@ def add_features(sender, **kwargs):
15321531
CONDA_APPEND_CORE_REQUIREMENTS,
15331532
_('Append Read the Docs core requirements to environment.yml file'),
15341533
),
1535-
(
1536-
SEARCH_ANALYTICS,
1537-
_('Enable search analytics'),
1538-
)
1534+
15391535
)
15401536

15411537
projects = models.ManyToManyField(

readthedocs/projects/views/private.py

-6
Original file line numberDiff line numberDiff line change
@@ -1006,12 +1006,6 @@ def get_context_data(self, **kwargs):
10061006
context = super().get_context_data(**kwargs)
10071007
project = self.get_project()
10081008

1009-
context['show_analytics'] = project.has_feature(
1010-
Feature.SEARCH_ANALYTICS,
1011-
)
1012-
if not context['show_analytics']:
1013-
return context
1014-
10151009
# data for plotting the line-chart
10161010
query_count_of_1_month = SearchQuery.generate_queries_count_of_one_month(
10171011
project.slug,

readthedocs/rtd_tests/tests/test_views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def setUp(self):
278278
test_time = timezone.datetime(2019, 8, 2, 12, 0)
279279
self.test_time = timezone.make_aware(test_time)
280280

281-
get(Feature, projects=[self.pip], feature_id=Feature.SEARCH_ANALYTICS)
281+
get(Feature, projects=[self.pip])
282282

283283
def test_top_queries(self):
284284
with mock.patch('django.utils.timezone.now') as test_time:

0 commit comments

Comments
 (0)