fix: don't fetch application count when user is not logged in

This commit is contained in:
Jannat Patel
2025-12-23 10:58:12 +05:30
parent 76979e292d
commit 3013372711
2 changed files with 7 additions and 3 deletions

View File

@@ -196,8 +196,8 @@ const job = createResource({
onSuccess: (data) => {
if (user.data?.name) {
jobApplication.submit()
applicationCount.submit()
}
applicationCount.submit()
},
})

View File

@@ -43,8 +43,12 @@ class TestCourseEvaluator(UnitTestCase):
def calculated_first_date_of_schedule(self):
today = getdate()
offset = (0 - today.weekday() + 7) % 7 # 0 for Monday
first_date = add_days(today, offset)
offset_monday = (0 - today.weekday() + 7) % 7 # 0 for Monday
offset_wednesday = (2 - today.weekday() + 7) % 7 # 2 for Wednesday
if offset_monday < offset_wednesday:
first_date = add_days(today, offset_monday)
else:
first_date = add_days(today, offset_wednesday)
return first_date
def calculated_last_date_of_schedule(self, first_date):