Permalink
Browse files

Fix wrong keyword name archived => archive

  • Loading branch information...
1 parent 7a38b4d commit 1632f5a03809336d7c87e1ebf801eafb002d1ecd @bruth bruth committed May 7, 2013
Showing with 4 additions and 4 deletions.
  1. +3 −3 serrano/resources/context.py
  2. +1 −1 serrano/resources/view.py
View
6 serrano/resources/context.py
@@ -78,7 +78,7 @@ def create_default(self, request):
form = ContextForm(request, {'json': default.json, 'session': True})
if form.is_valid():
- instance = form.save(archive=False)
+ instance = form.save()
return instance
log.error('Error creating default context', extra=dict(form.errors))
@@ -104,7 +104,7 @@ def post(self, request):
form = ContextForm(request, request.data)
if form.is_valid():
- instance = form.save(archived=HISTORY_ENABLED)
+ instance = form.save(archive=HISTORY_ENABLED)
response = self.render(request, self.prepare(request, instance),
status=codes.created)
else:
@@ -150,7 +150,7 @@ def put(self, request, **kwargs):
form = ContextForm(request, request.data, instance=instance)
if form.is_valid():
- instance = form.save(archived=HISTORY_ENABLED)
+ instance = form.save(archive=HISTORY_ENABLED)
response = self.render(request, self.prepare(request, instance))
else:
response = self.render(request, dict(form.errors),
View
2 serrano/resources/view.py
@@ -70,7 +70,7 @@ def create_default(self, request):
form = ViewForm(request, {'json': default.json, 'session': True})
if form.is_valid():
- instance = form.save(archive=False)
+ instance = form.save()
return instance
log.error('Error creating default view', extra=dict(form.errors))

0 comments on commit 1632f5a

Please sign in to comment.