Skip to content

Commit

Permalink
Merge pull request #1471 from gtech-mulearn/dev
Browse files Browse the repository at this point in the history
error log fix
  • Loading branch information
adnankattekaden authored Oct 29, 2023
2 parents 86f927f + 6c45992 commit f93ea09
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion api/dashboard/error_log/error_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ def get(self, request, log_name):


class ClearErrorLogAPI(APIView):
def get(self, request, log_name):
authentication_classes = [CustomizePermission]

@role_required(
[RoleType.ADMIN.value, RoleType.FELLOW.value, RoleType.TECH_TEAM.value]
)
def post(self, request, log_name):
error_log = f"{log_path}/{log_name}.log"
if os.path.exists(error_log):
try:
Expand Down

0 comments on commit f93ea09

Please sign in to comment.