fusionbox/django-widgy

`SitePermission` issues with widgy_mezzanine

Closed this issue · 0 comments

Since stephenmcd/mezzanine@d5d21ba sitepermissions aren't guaranteed to exist. This creates a couple potential problems.

First, staff users on sites not using mezzanine.core.middleware.SitePermissionMiddleware without explicitly defined sitepermissions will cause RelatedObjectDoesNotExist bugs.

Second, the MultiSiteCalloutAdmin (https://github.com/fusionbox/django-widgy/blob/master/widgy/contrib/widgy_mezzanine/admin.py#L347) assumes all users have sitepermissions.

I've put in a pull request to mezzanine (stephenmcd/mezzanine#1501) which if accepted will fix the first issue. The best fix for the second issue will depend on whether the pull request is merged in.