Skip to content

Qiita/redbiom overlap is not fully factoring in portals #2492

@wasade

Description

@wasade

This is leading to 500 errors, an example of one is below. The associated observation from @antgonza is: "The error is that qiita/redbiom code is not actually taking into account portals and when it tries to load/instantiate a study that is valid/public and in the main site but not in the EMP portal, it doesn't allows it."

ERROR:
Study with id 10729 inaccessible in current portal: EMP
TRACE:
Traceback (most recent call last):

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/web.py", line 1144, in _when_complete
if result.result() is not None:

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/concurrent.py", line 129, in result
raise_exc_info(self.__exc_info)

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/gen.py", line 221, in wrapper
runner.run()

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/gen.py", line 505, in run
yielded = self.gen.throw(*exc_info)

File "/home/qiita/qiita/qiita_pet/handlers/qiita_redbiom.py", line 121, in post
data, msg = yield Task(self._redbiom_search, search, search_on)

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/gen.py", line 533, in run
self.yield_point.start(self)

File "/home/qiita/.virtualenvs/qiita2/lib/python2.7/site-packages/tornado/gen.py", line 371, in start
self.func(*self.args, **self.kwargs)

File "/home/qiita/qiita/qiita_core/util.py", line 121, in wrapper
return func(*args, **kwargs)

File "/home/qiita/qiita/qiita_pet/handlers/qiita_redbiom.py", line 97, in _redbiom_search
message, study_artifacts = search_f[search_on](query, contexts)

File "/home/qiita/qiita/qiita_pet/handlers/qiita_redbiom.py", line 51, in _redbiom_metadata_search
a.id: samps for a in Study(sid).artifacts(

File "/home/qiita/qiita/qiita_db/base.py", line 198, in __init__
% (self.__class__.__name__, id_, qiita_config.portal))

QiitaDBError: Study with id 10729 inaccessible in current portal: EMP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions