Skip to content

Commit

Permalink
Fixed bug introduced by creating UserPermissionMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
dbunskoek committed Aug 27, 2012
1 parent dfd612c commit eb26ebd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fiber/admin.py
Expand Up @@ -106,7 +106,7 @@ def view_on_site(self, page):
absolute_url = page.get_absolute_url()
if absolute_url:
view_on_site += u'<a href="%s" title="%s" target="_blank"><img src="%sfiber/admin/images/world.gif" width="16" height="16" alt="%s" /></a>' % \
(absolute_url, _('View on site'), settings.STATIC_URL, _('View on site'))
(absolute_url, _('View on site'), settings.STATIC_URL, _('View on site'))

return view_on_site

Expand Down Expand Up @@ -179,8 +179,6 @@ def save_model(self, request, obj, form, change):
- Optionally positions a Page `obj` before or beneath another page, based on POST data.
- Notifies the PERMISSION_CLASS that a Page was created by `user`.
"""
super(FiberAdminPageAdmin, self).save_model(request, obj, form, change)

if 'before_page_id' in request.POST:
before_page = Page.objects.get(pk=int(request.POST['before_page_id']))
obj.parent = before_page.parent
Expand All @@ -190,6 +188,8 @@ def save_model(self, request, obj, form, change):
obj.parent = below_page
obj.insert_at(below_page, position='last-child', save=False)

super(FiberAdminPageAdmin, self).save_model(request, obj, form, change)


admin.site.register(ContentItem, ContentItemAdmin)
admin.site.register(Image, ImageAdmin)
Expand Down

0 comments on commit eb26ebd

Please sign in to comment.