pass user

This commit is contained in:
j 2018-01-15 12:20:01 +01:00
parent 2a0c2acc97
commit 5ac305c620
2 changed files with 2 additions and 2 deletions

View file

@ -274,7 +274,7 @@ def addCollection(request, data):
pos.position = qs.aggregate(Max('position'))['position__max'] + 1 pos.position = qs.aggregate(Max('position'))['position__max'] + 1
pos.save() pos.save()
response = json_response(status=200, text='created') response = json_response(status=200, text='created')
response['data'] = collection.json() response['data'] = collection.json(user=request.user)
add_changelog(request, data, collection.get_id()) add_changelog(request, data, collection.get_id())
return render_to_json_response(response) return render_to_json_response(response)
actions.register(addCollection, cache=False) actions.register(addCollection, cache=False)

View file

@ -269,7 +269,7 @@ def addList(request, data):
pos.position = qs.aggregate(Max('position'))['position__max'] + 1 pos.position = qs.aggregate(Max('position'))['position__max'] + 1
pos.save() pos.save()
response = json_response(status=200, text='created') response = json_response(status=200, text='created')
response['data'] = list.json() response['data'] = list.json(user=request.user)
add_changelog(request, data, list.get_id()) add_changelog(request, data, list.get_id())
return render_to_json_response(response) return render_to_json_response(response)
actions.register(addList, cache=False) actions.register(addList, cache=False)