async def get(
        self,
        db: AsyncSession,
        id: UUID,
        current_user: schemas.User,
        with_connections: bool = True,
    ) -> models.Sync | schemas.Sync:
        """Get the sync by ID.

        If with_connections is True, the sync will be enriched with all its connections,
        and returned as a schemas.Sync object.

        If with_connections is False, the sync will not be enriched with any connections,
        and returned as a models.Sync object.

        Args:
            db (AsyncSession): The database session
            id (UUID): The ID of the sync
            current_user (schemas.User): The current user
            with_connections (bool): Whether to include connections in the sync
        Returns:
            models.Sync: The sync without any connections
        """
        # Get the sync without any connections
        sync = await super().get(db, id=id, current_user=current_user)

        if not sync:
            raise HTTPException(status_code=404, detail="Sync not found")

        if with_connections:
            # Enrich the sync with all its connections
            sync = await self.enrich_sync_with_connections(db, sync=sync)

        # Validate user permissions
        self._validate_if_user_has_permission(
            sync, current_user
        )  # NB: raises airweave.core.exceptions.PermissionException if user doesn't have permission
        return sync
Get the sync by ID.

        If with_connections is True, the sync will be enriched with all its connections,
        and returned as a schemas.Sync object.

        If with_connections is False, the sync will not be enriched with any connections,
        and returned as a models.Sync object.

        Args:
            db (AsyncSession): The database session
            id (UUID): The ID of the sync
            current_user (schemas.User): The current user
            with_connections (bool): Whether to include connections in the sync
        Returns:
            models.Sync: The sync without any connections
        
backend/airweave/crud/crud_sync.py