if has_add_forge_now_permission(request.user):
for item in page.object_list:
history = AddForgeNowRequestHistory.objects.filter(request=item ).filter(actor_role = "MODERATOR").order_by(
"id"
)
item.__dict__["actor_role"] = "SUBMITTER"
item.__dict__["actor"] = item.submitter_name
item.__dict__["last_modified_date"] = item.submission_date
for history_item in history:
item.__dict__["actor_role"] = history_item.__dict__["actor_role"]
item.__dict__["actor"] = history_item.__dict__["actor"]
item.__dict__["last_modified_date"] = history_item.__dict__["date"]
requests = AddForgeNowRequestSerializer(page.object_list, many=True).data
else:
requests = AddForgeNowRequestPublicSerializer(page.object_list, many=True).data