Skip to content

Commit 3013372

Browse files
committed
fix: don't fetch application count when user is not logged in
1 parent 76979e2 commit 3013372

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

frontend/src/pages/JobDetail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ const job = createResource({
196196
onSuccess: (data) => {
197197
if (user.data?.name) {
198198
jobApplication.submit()
199+
applicationCount.submit()
199200
}
200-
applicationCount.submit()
201201
},
202202
})
203203

lms/lms/doctype/course_evaluator/test_course_evaluator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ def test_schedule_dates(self):
4343

4444
def calculated_first_date_of_schedule(self):
4545
today = getdate()
46-
offset = (0 - today.weekday() + 7) % 7 # 0 for Monday
47-
first_date = add_days(today, offset)
46+
offset_monday = (0 - today.weekday() + 7) % 7 # 0 for Monday
47+
offset_wednesday = (2 - today.weekday() + 7) % 7 # 2 for Wednesday
48+
if offset_monday < offset_wednesday:
49+
first_date = add_days(today, offset_monday)
50+
else:
51+
first_date = add_days(today, offset_wednesday)
4852
return first_date
4953

5054
def calculated_last_date_of_schedule(self, first_date):

0 commit comments

Comments
 (0)