Skip to content

Commit

Permalink
fix: elasticsearch form schema [TCTC-8032] (#1580)
Browse files Browse the repository at this point in the history
* fix: elasticsearch form schema

* chore: bump version to 6.1.1
  • Loading branch information
fspot authored Mar 18, 2024
1 parent 122108d commit 088cf86
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Unreleased

## [6.1.1] 2024-03-18

### Fixed

- Elasticsearch: force `widget="json"` on `body` so the form is properly filled when updating a data source

## [6.1.0] 2024-03-13

### Changed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "toucan-connectors"
version = "6.1.0"
version = "6.1.1"
description = "Toucan Toco Connectors"
authors = ["Toucan Toco <[email protected]>"]
license = "BSD"
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sonar.organization=toucantoco

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=Toucan Connectors
sonar.projectVersion=6.1.0
sonar.projectVersion=6.1.1
sonar.python.version=3.11

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
Expand Down
8 changes: 4 additions & 4 deletions toucan_connectors/elasticsearch/elasticsearch_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from copy import deepcopy
from enum import Enum
from typing import List, Union
from typing import List
from urllib.parse import urlparse

import pandas as pd
Expand Down Expand Up @@ -112,9 +112,9 @@ class SearchMethod(str, Enum):


class ElasticsearchDataSource(ToucanDataSource):
search_method: SearchMethod
index: str = None
body: Union[dict, list]
search_method: SearchMethod = Field(SearchMethod.search, title="Search method")
index: str | None = Field(None, title="Index")
body: dict | list = Field({}, description="Body of elasticsearch query", widget="json")


class ElasticsearchConnector(ToucanConnector, data_source_model=ElasticsearchDataSource):
Expand Down

0 comments on commit 088cf86

Please sign in to comment.