Stripping `content` field from receiving from postgresql while getting all study templates

This commit is contained in:
Evgeniy Timokhov 2020-01-28 12:41:40 +03:00
parent 2b92d317f1
commit 81b99d4338
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ def processRequest(request):
def getAllTemplatesList(clientId, userId):
items = models.StudyTemplate.objects.filter(ownerSource = clientId, ownerId = userId)
items = models.StudyTemplate.objects.defer('content').filter(ownerSource = clientId, ownerId = userId)
result = map(lambda x : {'name': x.name} , items)
return common.response(json.dumps({'status': "ok", 'data': list(result)}))