(self, restore_state)
return changes_since_last_sync
Determine if a data collection needs to be synced.
Determine if a data collection needs to be synced.
Determine if a data collection needs to be synced .
def _should_sync(self, restore_state):
        """
        Determine if a data collection needs to be synced.
        """
        last_sync = restore_state.last_sync_log
        if not last_sync:
            # definitely sync if we haven't synced before
            return True

        changes_since_last_sync = SQLProduct.objects.filter(
            domain=restore_state.restore_user.domain, last_modified__gte=last_sync.date
        ).exists()

        return changes_since_last_sync
def _should_sync ( self , restore_state ) : last_sync = restore_state . last_sync_log if not last_sync : # definitely sync if we haven't synced before return True changes_since_last_sync = SQLProduct . objects . filter ( domain = restore_state . restore_user . domain , last_modified__gte = last_sync . date ) . exists ( ) return changes_since_last_sync