make keys optional in get request

This commit is contained in:
j 2012-01-24 02:15:49 +05:30
parent c06f94fb24
commit 425c7a874a

View file

@ -389,6 +389,7 @@ def get(request):
'''
response = json_response({})
data = json.loads(request.POST['data'])
data['keys'] = data.get('keys', [])
item = get_object_or_404_json(models.Item, itemId=data['id'])
if item.access(request.user):
info = item.get_json(data['keys'])