Prefetcher added for org admins trying to access ParticipantsComponent.
Prefetcher added for org admins trying to access ParticipantsComponent.

Apparently it is not possible to remove prefecher only for some users of the list. Here, the situtation was:

if A:
  prefetcher = Prefecher()
else:
  prefetcher = None

It is not obvious, so I am putting this note here: using a prefecher determines how a function describing the prefetched column looks like. In our example, it is, for example,

lambda ent, orgs, *args: ', '.join(
            [get(i, orgs) for i in ent.mentor_for if data.orgAdminFor(i)]))

Therefore, not setting any prefetcher in the other IF branch caused the lambda function not be (or to be?) passed an entity. Therefore, TypeError: <lambda>() takes at least 2 arguments (1 given) was raised.

This commit is related to issue 1818.

rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son