Asset list item: Don't show user.full_name in latest and random assets

This commit is contained in:
2018-10-04 12:30:05 +02:00
parent a9848c3fad
commit f2207bc4d4
2 changed files with 4 additions and 7 deletions

View File

@@ -278,11 +278,6 @@ def get_random_featured_nodes() -> typing.List[dict]:
'foreignField': '_id',
'as': 'node'}},
{'$unwind': {'path': '$node'}},
{'$lookup': {"from": "users",
"localField": "node.user",
"foreignField": "_id",
"as": "node.user"}},
{'$unwind': {'path': "$node.user"}},
{'$match': {'node._deleted': {'$ne': True}}},
{'$project': {'url': True,
'name': True,
@@ -296,7 +291,8 @@ def get_random_featured_nodes() -> typing.List[dict]:
'node.properties.duration_seconds': True,
'node.properties.url': True,
'node._created': True,
'node.user.full_name': True,}},
}
},
])
featured_node_documents = []

View File

@@ -167,3 +167,4 @@ class RandomFeaturedNodeTest(AbstractCloudTest):
self.assertEquals(self.fake_now, asset['_created'])
self.assertEquals(str(node_id), asset['_id'])
self.assertEquals(75, asset['properties']['duration_seconds'])
self.assertNotIn('user', asset)