(self, *args, **kw)
Post enqueued changes from device to HQ

        Calls `change_cases(*args, **kw)` with any arguments (if given)
        for convenience.

        This is the first half of a full sync. It does not affect the
        latest sync log on the device and can be used when the result of
        a restore on this device is not important.
Post enqueued changes from device to HQ
Post enqueued changes from device to HQ
def post_changes(self, *args, **kw):
        """Post enqueued changes from device to HQ

        Calls `change_cases(*args, **kw)` with any arguments (if given)
        for convenience.

        This is the first half of a full sync. It does not affect the
        latest sync log on the device and can be used when the result of
        a restore on this device is not important.
        """
        if args or kw:
            self.change_cases(*args, **kw)
        if self.case_blocks:
            # post device case changes
            token = self.last_sync.restore_id if self.last_sync else None
            form = self.case_factory.post_case_blocks(
                self.case_blocks,
                device_id=self.id,
                form_extras={"last_sync_token": token},
                user_id=self.user_id,
            )[0]
            self.case_blocks = []
            return form
def post_changes ( self , * args , * * kw ) : if args or kw : self . change_cases ( * args , * * kw ) if self . case_blocks : # post device case changes token = self . last_sync . restore_id if self . last_sync else None form = self . case_factory . post_case_blocks ( self . case_blocks , device_id = self . id , form_extras = { "last_sync_token" : token } , user_id = self . user_id , ) [ 0 ] self . case_blocks = [ ] return form