trying agent iterator
@@ -70,7 +70,8 @@ def complex_get(param_dict, limit, language, format, attachments):
# If it is an agent and not a group, retrieve all groups it is part of
if agent.objectType == "Agent":
groups = agent.member.all()
- for g in queryset_iterator(groups):
+ if groups.exists():
+ for g in groups.iterator():
agentQ = agentQ | Q(actor=g) | Q(object_agent=g)
if related:
agentQ = agentQ | Q(authority=g) \
