Skip to content

Commit

Permalink
feat: add show columns to Reports model (#15712)
Browse files Browse the repository at this point in the history
* added logic for creation_method

* revisions

* added index

* Update superset/migrations/versions/3317e9248280_add_creation_method_to_reports_model.py

* filters

* search columns updated
  • Loading branch information
AAfghahi committed Jul 19, 2021
1 parent a7cbcde commit 3a249a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions superset/reports/api.py
Expand Up @@ -182,6 +182,9 @@ def ensure_alert_reports_enabled(self) -> Optional[Response]:
"created_by",
"type",
"last_state",
"creation_method",
"dashboard_id",
"chart_id",
]
search_filters = {"name": [ReportScheduleAllTextFilter]}
allowed_rel_fields = {"owners", "chart", "dashboard", "database", "created_by"}
Expand Down
2 changes: 1 addition & 1 deletion tests/integration_tests/reports/api_tests.py
Expand Up @@ -773,7 +773,7 @@ def test_create_report_schedule_relations_exist(self):
data = json.loads(rv.data.decode("utf-8"))
assert data == {"message": {"dashboard": "Dashboard does not exist"}}

@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
# @pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
# TODO (AAfghahi): I am going to enable this when the report schedule feature is fully finished
# def test_create_report_schedule_no_creation_method(self):
# """
Expand Down

0 comments on commit 3a249a0

Please sign in to comment.