Skip to content

Commit

Permalink
Update inactive projects
Browse files Browse the repository at this point in the history
  • Loading branch information
dimasciput committed Jun 26, 2024
1 parent 6014359 commit c2a8528
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions timesheet/utils/erp.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ def pull_projects_from_erp(user: get_user_model()):
inactive = UserProject.objects.exclude(
project__updated=updated
)
if inactive.exists():
inactive_projects = Project.objects.filter(
id__in=inactive.values('project')
).distinct()
inactive_projects.update(is_active=False)
# if inactive.exists():
# inactive_projects = Project.objects.filter(
# id__in=inactive.values('project')
# ).distinct()
# inactive_projects.update(is_active=False)

tasks = get_erp_data(
DocType.TASK, user.profile.token
Expand Down

0 comments on commit c2a8528

Please sign in to comment.