{"action":"created","issue":{"url":"https://api.github.com/repos/web2py/web2py/issues/946","labels_url":"https://api.github.com/repos/web2py/web2py/issues/946/labels{/name}","comments_url":"https://api.github.com/repos/web2py/web2py/issues/946/comments","events_url":"https://api.github.com/repos/web2py/web2py/issues/946/events","html_url":"https://github.com/web2py/web2py/issues/946","id":71260814,"number":946,"title":"Record Archives error on 2.10.4","user":{"login":"franciscocosta","id":85894,"avatar_url":"https://avatars.githubusercontent.com/u/85894?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscocosta","html_url":"https://github.com/franciscocosta","followers_url":"https://api.github.com/users/franciscocosta/followers","following_url":"https://api.github.com/users/franciscocosta/following{/other_user}","gists_url":"https://api.github.com/users/franciscocosta/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscocosta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscocosta/subscriptions","organizations_url":"https://api.github.com/users/franciscocosta/orgs","repos_url":"https://api.github.com/users/franciscocosta/repos","events_url":"https://api.github.com/users/franciscocosta/events{/privacy}","received_events_url":"https://api.github.com/users/franciscocosta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-27T11:51:12Z","updated_at":"2015-04-27T12:02:04Z","closed_at":null,"body":"**Error snapshot**\r\n<type 'exceptions.TypeError'>(isinstance() arg 2 must be a class, type, or tuple of classes and types)\r\n\r\n\r\n**Traceback**\r\nTraceback (most recent call last):\r\n  File \"/home/franciscocosta/www/web2py/gluon/restricted.py\", line 227, in restricted\r\n    exec ccode in environment\r\n  File \"/home/franciscocosta/www/web2py/applications/emprega/views/historico.html\", line 438, in <module>\r\n  File \"/home/franciscocosta/www/web2py/gluon/sqlhtml.py\", line 3253, in __init__\r\n    r = represent(field, r or [], record)\r\n  File \"/home/franciscocosta/www/web2py/gluon/sqlhtml.py\", line 68, in represent\r\n    return f(value)\r\n  File \"/home/franciscocosta/www/web2py/gluon/packages/dal/pydal/helpers/methods.py\", line 268, in __call__\r\n    if isinstance(db._adapter, GoogleDatastoreAdapter):\r\nTypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types\r\n\r\n**Code listing**\r\n```\r\n        if not value:\r\n            return None\r\n        from ..adapters import GoogleDatastoreAdapter\r\n        refs = None\r\n        db, id = self.ref._db, self.ref._id\r\n        if isinstance(db._adapter, GoogleDatastoreAdapter):\r\n\r\n            def count(values):\r\n                return db(id.belongs(values)).select(id)\r\n            rx = range(0, len(value), 30)\r\n            refs = reduce(lambda a, b: a & b, [count(value[i:i+30])\r\n```\r\n\r\nThis was working fine on 2.10.3\r\nMy database is MongoDB\r\n\r\nIn the controller:\r\n```\r\narchives = db(db.jobs_archive.current_record == job.id).select(orderby=~db.jobs_archive.modified_on)\r\n```\r\n\r\nIn the view:\r\n```\r\n{{=SQLTABLE(archives, linkto, upload, orderby=True, _class='table table-bordered table-striped sortable')}}\r\n```"},"comment":{"url":"https://api.github.com/repos/web2py/web2py/issues/comments/96622221","html_url":"https://github.com/web2py/web2py/issues/946#issuecomment-96622221","issue_url":"https://api.github.com/repos/web2py/web2py/issues/946","id":96622221,"user":{"login":"ilvalle","id":1519351,"avatar_url":"https://avatars.githubusercontent.com/u/1519351?v=3","gravatar_id":"","url":"https://api.github.com/users/ilvalle","html_url":"https://github.com/ilvalle","followers_url":"https://api.github.com/users/ilvalle/followers","following_url":"https://api.github.com/users/ilvalle/following{/other_user}","gists_url":"https://api.github.com/users/ilvalle/gists{/gist_id}","starred_url":"https://api.github.com/users/ilvalle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilvalle/subscriptions","organizations_url":"https://api.github.com/users/ilvalle/orgs","repos_url":"https://api.github.com/users/ilvalle/repos","events_url":"https://api.github.com/users/ilvalle/events{/privacy}","received_events_url":"https://api.github.com/users/ilvalle/received_events","type":"User","site_admin":false},"created_at":"2015-04-27T12:02:04Z","updated_at":"2015-04-27T12:02:04Z","body":"This is due to GoogleDatastoreAdapter being None.\r\nCan you try to replace the failing line with ```if db._adapter.dbengine == 'google:datastore'```"}}