Skip to content

Commit cf454dd

Browse files
committed
fix: filter issue
1 parent 04a71af commit cf454dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

backend/src/main/java/com/thughari/jobtrackerpro/service/GmailIntegrationService.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,11 @@ private void createJobFilter(Gmail service, String labelId) throws Exception {
387387
String finalQuery = "(" + ATS_FILTER + " OR " + SUBJECT_FILTER + ")" + EXCLUSIONS;
388388

389389
ListFiltersResponse listResponse = service.users().settings().filters().list("me").execute();
390-
391-
List<Filter> existingFilters = listResponse.getFilter();
392390

393-
if (existingFilters != null) {
391+
if (listResponse != null && listResponse.getFilter() != null) {
392+
393+
List<Filter> existingFilters = listResponse.getFilter();
394+
394395
for (Filter existingFilter : existingFilters) {
395396

396397
if (existingFilter.getAction() != null &&

0 commit comments

Comments
 (0)