File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -387,11 +387,12 @@ def batch_upsert_hubspot_objects( # pylint:disable=too-many-arguments # noqa:
387387 id__in = [id [0 ] for id in synced_object_ids ] # noqa: A001
388388 )
389389 if model_name == "user" :
390- unsynced_objects = (
391- unsynced_objects .filter (is_active = True , email__contains = "@" )
392- .exclude (social_auth__isnull = True )
393- .order_by (F ("hubspot_sync_datetime" ).asc (nulls_first = True ))
394- )
390+ unsynced_objects = unsynced_objects .filter (
391+ is_active = True ,
392+ email__contains = "@" ,
393+ global_id__isnull = False ,
394+ last_login__isnull = False ,
395+ ).order_by (F ("hubspot_sync_datetime" ).asc (nulls_first = True ))
395396 unsynced_object_ids = unsynced_objects .values_list ("id" , flat = True )
396397 object_ids = unsynced_object_ids if create else synced_object_ids
397398 elif not create :
You can’t perform that action at this time.
0 commit comments