Asset list item: Don't show user.full_name in latest and random assets
This commit is contained in:
@@ -278,11 +278,6 @@ def get_random_featured_nodes() -> typing.List[dict]:
|
|||||||
'foreignField': '_id',
|
'foreignField': '_id',
|
||||||
'as': 'node'}},
|
'as': 'node'}},
|
||||||
{'$unwind': {'path': '$node'}},
|
{'$unwind': {'path': '$node'}},
|
||||||
{'$lookup': {"from": "users",
|
|
||||||
"localField": "node.user",
|
|
||||||
"foreignField": "_id",
|
|
||||||
"as": "node.user"}},
|
|
||||||
{'$unwind': {'path': "$node.user"}},
|
|
||||||
{'$match': {'node._deleted': {'$ne': True}}},
|
{'$match': {'node._deleted': {'$ne': True}}},
|
||||||
{'$project': {'url': True,
|
{'$project': {'url': True,
|
||||||
'name': True,
|
'name': True,
|
||||||
@@ -296,7 +291,8 @@ def get_random_featured_nodes() -> typing.List[dict]:
|
|||||||
'node.properties.duration_seconds': True,
|
'node.properties.duration_seconds': True,
|
||||||
'node.properties.url': True,
|
'node.properties.url': True,
|
||||||
'node._created': True,
|
'node._created': True,
|
||||||
'node.user.full_name': True,}},
|
}
|
||||||
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
featured_node_documents = []
|
featured_node_documents = []
|
||||||
|
@@ -166,4 +166,5 @@ class RandomFeaturedNodeTest(AbstractCloudTest):
|
|||||||
self.assertTrue(asset.properties.content_type == 'video')
|
self.assertTrue(asset.properties.content_type == 'video')
|
||||||
self.assertEquals(self.fake_now, asset['_created'])
|
self.assertEquals(self.fake_now, asset['_created'])
|
||||||
self.assertEquals(str(node_id), asset['_id'])
|
self.assertEquals(str(node_id), asset['_id'])
|
||||||
self.assertEquals(75, asset['properties']['duration_seconds'])
|
self.assertEquals(75, asset['properties']['duration_seconds'])
|
||||||
|
self.assertNotIn('user', asset)
|
||||||
|
Reference in New Issue
Block a user