Skip to content

Commit

Permalink
Merge pull request #148 from null-open-security-community/main
Browse files Browse the repository at this point in the history
Job delete fix
  • Loading branch information
YogeshUpdhyay authored Jan 5, 2025
2 parents 3ba5d0f + 949674f commit 6fdc795
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/jobs/utils/user_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def has_permission(self, request, view):
"""Return bool values based on user_type"""

# Add the user_id to the JWT Later
employer_id = request.user_id
employer_id = request.user.id

if not employer_id or not validationClass.is_valid_uuid(employer_id):
return False
Expand Down
2 changes: 1 addition & 1 deletion apps/jobs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def destroy(self, request, pk, *args, **kwargs):

# check if the user_id present in the request belongs to Employer or Moderator
if not (
UserTypeCheck.is_user_employer(request.user_id)
UserTypeCheck.is_user_employer(request.user.id)
or Moderator().has_permission(request)
):
return response.create_response(
Expand Down

0 comments on commit 6fdc795

Please sign in to comment.