(user)
return {"synchronized": sync_groups, "not-synchronized": unsynced}
Returns the current Device Sync status
Returns the current Device Sync status
Returns the current Device Sync status
def get_sync_status(user):
    """Returns the current Device Sync status"""

    sync_groups = []
    unsynced = []

    user = UserProxy.objects.from_user(user)
    for group in user.get_grouped_devices():
        uids = [device.uid for device in group.devices]

        if group.is_synced:
            sync_groups.append(uids)

        else:
            unsynced = uids

    return {"synchronized": sync_groups, "not-synchronized": unsynced}
def get_sync_status ( user ) : sync_groups = [ ] unsynced = [ ] user = UserProxy . objects . from_user ( user ) for group in user . get_grouped_devices ( ) : uids = [ device . uid for device in group . devices ] if group . is_synced : sync_groups . append ( uids ) else : unsynced = uids return { "synchronized" : sync_groups , "not-synchronized" : unsynced }