Skip to content

Commit

Permalink
Merge pull request #1698 from Bidaya0/fix/agent_register_remove_depar…
Browse files Browse the repository at this point in the history
…tment

fix: agent register remove department.
  • Loading branch information
Bidaya0 authored Aug 3, 2023
2 parents 879bb53 + 8699f4a commit a8d09ef
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions dongtai_protocol/views/agent_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ class AgentRegisterEndPoint(OpenApiEndPoint):

@staticmethod
def register_agent(token, version, language, project_name, user, project_version):
department = user.get_using_department()
project = IastProject.objects.values("id").filter(name=project_name, department=department).first()
project = IastProject.objects.values("id").filter(name=project_name).first()
is_audit = AgentRegisterEndPoint.get_is_audit()
project_id = 0
project_version_id = 0
project_id = -1
project_version_id = -1
if project:
if project_version:
project_current_version = project_version
Expand Down Expand Up @@ -382,7 +381,7 @@ def __register_agent(
language=language,
is_audit=is_audit,
allow_report=allow_report,
department_id=-1,
department_id=1,
)
return agent.id

Expand Down

0 comments on commit a8d09ef

Please sign in to comment.