You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Few imports have been made under a condition, but they are used anywhere in the views file. If the condition is not satisfied, it will throw an error, such as "variable is not defined."
notesapi/v1/views.py (line 18 to 30)
if not settings.ES_DISABLED:
from elasticsearch_dsl import Search
from elasticsearch_dsl.connections import connections
from django_elasticsearch_dsl_drf.filter_backends import DefaultOrderingFilterBackend, HighlightBackend
from django_elasticsearch_dsl_drf.constants import (
LOOKUP_FILTER_TERM,
LOOKUP_QUERY_IN,
SEPARATOR_LOOKUP_COMPLEX_VALUE,
)
from notesapi.v1.search_indexes.paginators import NotesPagination as ESNotesPagination
from notesapi.v1.search_indexes.backends import CompoundSearchFilterBackend, FilteringFilterBackend
from notesapi.v1.search_indexes.serializers import NoteDocumentSerializer as NotesElasticSearchSerializer
but used anywhere without any conditions.
example LOOKUP_FILTER_TERM has been imported under ES_DISABLED condition but used without any prior condition.
in this, if we disable the ES_DISABLED = True then the project will throw errors.
The text was updated successfully, but these errors were encountered:
Few imports have been made under a condition, but they are used anywhere in the views file. If the condition is not satisfied, it will throw an error, such as "variable is not defined."
notesapi/v1/views.py (line 18 to 30)
but used anywhere without any conditions.
example LOOKUP_FILTER_TERM has been imported under ES_DISABLED condition but used without any prior condition.
in this, if we disable the
ES_DISABLED = True
then the project will throw errors.The text was updated successfully, but these errors were encountered: