Skip to content

Commit

Permalink
MAINT: Remove long-obsolete automatic type "(solr) query"
Browse files Browse the repository at this point in the history
  • Loading branch information
wosc committed Sep 3, 2024
1 parent 02502cb commit e443973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/src/zeit/content/cp/browser/tests/test_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def test_edit_form_stores_custom_query(self):
b = self.browser
b.open(self.get_edit_area_link())
edit_url = b.url
b.getControl(name='form.automatic_type').displayValue = ['automatic-area-type-query']
b.getControl(name='form.automatic_type').displayValue = ['automatic-area-type-custom']
b.getControl('Amount of teasers').value = '1'
b.getControl('Add Custom Query').click()
b.getControl('Custom Query Type').displayValue = ['query-type-serie']
Expand Down Expand Up @@ -166,7 +166,7 @@ def test_edit_form_stores_custom_query(self):
def test_removes_mismatched_custom_query_value_on_type_change(self):
b = self.browser
b.open(self.get_edit_area_link())
b.getControl(name='form.automatic_type').displayValue = ['automatic-area-type-query']
b.getControl(name='form.automatic_type').displayValue = ['automatic-area-type-custom']
b.getControl('Amount of teasers').value = '1'
b.getControl('Add Custom Query').click()
b.getControl('Channel').displayValue = ['International']
Expand Down
4 changes: 0 additions & 4 deletions core/src/zeit/content/cp/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ class AutomaticTypeSource(zeit.cms.content.sources.SimpleDictSource):
('custom', _('automatic-area-type-custom')),
('topicpage', _('automatic-area-type-topicpage')),
('related-topics', _('automatic-area-type-related-topics')),
('query', _('automatic-area-type-query')),
('elasticsearch-query', _('automatic-area-type-elasticsearch-query')),
('reach', _('automatic-area-type-reach')),
('topicpagelist', _('automatic-area-type-topicpagelist')),
Expand All @@ -241,9 +240,6 @@ def automatic_area_can_read_teasers_automatically(data):
if data.automatic_type == 'related-topics' and data.related_topicpage:
return True

if data.automatic_type == 'query' and data.raw_query:
return True

if data.automatic_type == 'elasticsearch-query' and data.elasticsearch_raw_query:
return True

Expand Down

0 comments on commit e443973

Please sign in to comment.