Skip to content

Commit

Permalink
Fix bug hiding assigned public shifts
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsuta committed Nov 6, 2024
1 parent 64d50ca commit 8c66450
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions uber/site_sections/staffing.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def shifts(self, session, view='', start='', all=''):
event_dates.append(day.strftime('%Y-%m-%d'))
day += timedelta(days=1)

default_filters = []
default_filters = [{'id': 'public_assigned', 'title': "Assigned Shifts (Public)"}]
for department in volunteer.assigned_depts:
default_filters.append({
'id': department.id,
Expand Down Expand Up @@ -321,9 +321,13 @@ def get_assigned_jobs(self, session, **params):

for shift in volunteer.shifts:
job = shift.job
if job.is_public and job.department_id not in set(volunteer.assigned_depts_ids):
resource_id = "public_assigned"
else:
resource_id = job.department_id
event_list.append({
'id': shift.id,
'resourceIds': [job.department_id],
'resourceIds': [resource_id],
'allDay': False,
'start': job.start_time_local.isoformat(),
'end': job.end_time_local.isoformat(),
Expand Down

0 comments on commit 8c66450

Please sign in to comment.