'non-login request: load a session'

def resume(self):

    import frappe
    data = self.get_session_record()
    if data:
        self.data.update({u'data': data, u'user': data.user, u'sid': self.sid})
        self.user = data.user
        self.device = data.device
    else:
        self.start_as_guest()
    if (self.sid != u'Guest'):
        frappe.local.user_lang = frappe.translate.get_user_lang(self.data.user)
        frappe.local.lang = frappe.local.user_lang
