Skip to content

Commit

Permalink
This Time, It's totally fixed and tested.
Browse files Browse the repository at this point in the history
  • Loading branch information
issackelly committed Mar 25, 2011
1 parent 2bbb103 commit a30d12d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion servee/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION = (0, 6, 0, "a", 1) # following PEP 386
DEV_N = "8"
DEV_N = "9"

# cribbed from pinax
# https://github.com/pinax/pinax/raw/master/LICENSE
Expand Down
5 changes: 4 additions & 1 deletion servee/frontendadmin/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def response_change(self, request, obj):
"""

# in these cases, the redirect is good
if list(set(request.POST) & set(["_addanother", "_saveasnew", "_continue"])):
if list(set(request.POST.keys()) & set(["_addanother", "_saveasnew", "_continue"])):
return super(ServeeModelAdmin, self).response_change(request, obj)

# we want to override the default save case in the frontend
Expand All @@ -77,6 +77,9 @@ def response_change(self, request, obj):
return HttpResponse("<script type='text/javascript'>window.location.reload(true);</script>")
elif request.FILES:
return HttpResponseRedirect(ref)

# fallback to normal functionality
return super(ServeeModelAdmin, self).response_change(request, obj)

def change_view(self, *args, **kwargs):
"""
Expand Down

0 comments on commit a30d12d

Please sign in to comment.