Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
airflow utils: adapted headers
Browse files Browse the repository at this point in the history
  • Loading branch information
DonHaul committed Aug 14, 2024
1 parent c63f1a3 commit ba0c75f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions backoffice/backoffice/workflows/airflow_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
AIRFLOW_BASE_URL = environ.get("AIRFLOW_BASE_URL")

AIRFLOW_HEADERS = {
"Content-Type": "application/json",
"Authorization": f"Basic {environ.get('AIRFLOW_TOKEN')}",
}

Expand Down Expand Up @@ -140,10 +139,7 @@ def delete_workflow_dag(dag_id, workflow_id):
dag_id,
url,
)
response = requests.delete(
url,
headers=AIRFLOW_HEADERS,
)
response = requests.delete(url, headers=AIRFLOW_HEADERS)
response.raise_for_status()
return JsonResponse({"message": "Successfully deleted DAG"})
except RequestException:
Expand Down

0 comments on commit ba0c75f

Please sign in to comment.