Skip to content

Commit

Permalink
Merge pull request #1472 from gtech-mulearn/dev-server
Browse files Browse the repository at this point in the history
error log fix clear
  • Loading branch information
adnankattekaden authored Oct 29, 2023
2 parents d259d5d + f93ea09 commit 42bbad2
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 42bbad2

Please sign in to comment.