Skip to content

Commit

Permalink
Merge branch 'dashboard' of github.com:AI-READI/fairhub-api into dash…
Browse files Browse the repository at this point in the history
…board
  • Loading branch information
greenstick committed Feb 13, 2024
2 parents 478cb12 + 745a84b commit 2383b55
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions apis/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ def post(self, study_id: int):
)
model.db.session.add(connect_redcap_project_dashboard_data)
model.db.session.commit()
connect_redcap_project_dashboard: Dict[
str, Any
] = connect_redcap_project_dashboard_data.to_dict()
connect_redcap_project_dashboard: Dict[str, Any] = (
connect_redcap_project_dashboard_data.to_dict()
)
return connect_redcap_project_dashboard, 201


Expand All @@ -315,9 +315,9 @@ def get(self, study_id: int):
model.StudyRedcapProjectDashboard
).get(dashboard_id)

redcap_project_dashboard_connector: Dict[
str, Any
] = redcap_project_dashboard_connector_query.to_dict()
redcap_project_dashboard_connector: Dict[str, Any] = (
redcap_project_dashboard_connector_query.to_dict()
)

return redcap_project_dashboard_connector, 201

Expand Down Expand Up @@ -349,9 +349,9 @@ def get(self, study_id: int):
redcap_project_dashboard_query: Any = model.db.session.query(
model.StudyRedcapProjectDashboard
).get(dashboard_id)
redcap_project_dashboard: Dict[
str, Any
] = redcap_project_dashboard_query.to_dict()
redcap_project_dashboard: Dict[str, Any] = (
redcap_project_dashboard_query.to_dict()
)

# Get REDCap Project
project_id = redcap_project_dashboard["project_id"]
Expand All @@ -367,9 +367,9 @@ def get(self, study_id: int):
report["report_key"] == report_config["key"]
and len(report["report_id"]) > 0
):
redcapTransformConfig["reports"][i]["kwdargs"][
"report_id"
] = report["report_id"]
redcapTransformConfig["reports"][i]["kwdargs"]["report_id"] = (
report["report_id"]
)

# Structure REDCap ETL Config
redcap_etl_config = {
Expand Down Expand Up @@ -517,9 +517,9 @@ def put(self, study_id: int):

redcap_project_dashboard_query.update(data)
model.db.session.commit()
update_redcap_project_dashboard: Dict[
str, Any
] = redcap_project_dashboard_query.to_dict()
update_redcap_project_dashboard: Dict[str, Any] = (
redcap_project_dashboard_query.to_dict()
)

# Clear Dashboard from Redis Cache
cache.delete(f"$study_id#{study_id}$dashboard_id#{dashboard_id}")
Expand Down

0 comments on commit 2383b55

Please sign in to comment.