Skip to content

Commit

Permalink
Merge pull request #5181 from gitcoinco/more-job-scrubbing
Browse files Browse the repository at this point in the history
remove more job fields and check show job status null
  • Loading branch information
thelostone-mc authored Sep 12, 2019
2 parents df15d0d + 60f46f1 commit ebe6f4b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,11 +870,6 @@ def previous_worked():
'job_type', 'linkedin_url', 'resume', 'remote', 'keywords',
'organizations', 'is_org']}

if user.show_job_status is False:
del profile_json['job_salary']
del profile_json['job_location']
del profile_json['job_type']

profile_json['job_status'] = user.job_status_verbose if user.job_search_status else None
profile_json['previously_worked'] = user.previous_worked_count > 0
profile_json['position_contributor'] = user.get_contributor_leaderboard_index()
Expand All @@ -883,6 +878,13 @@ def previous_worked():
profile_json['work_inprogress'] = count_work_in_progress
profile_json['verification'] = user.get_my_verified_check
profile_json['avg_rating'] = user.get_average_star_rating

if not user.show_job_status:
for key in ['job_salary', 'job_location', 'job_type',
'linkedin_url', 'resume', 'job_search_status',
'remote', 'job_status']:
del profile_json[key]

if user.avatar_baseavatar_related.exists():
user_avatar = user.avatar_baseavatar_related.first()
profile_json['avatar_id'] = user_avatar.pk
Expand Down

0 comments on commit ebe6f4b

Please sign in to comment.