Skip to content

Commit

Permalink
Merge pull request bread-and-pepper#292 from rosscdh/lp
Browse files Browse the repository at this point in the history
Requirements update.
  • Loading branch information
wunki committed Mar 6, 2013
2 parents 4538cfa + f24f181 commit 6123415
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
packages = find_packages(exclude=['demo', 'demo.*']),
include_package_data=True,
install_requires = [
'Django>=1.3.1',
'easy_thumbnails',
'django-guardian>=0.1.0',
'django-guardian>=1.1.0.beta',
### Required to build documentation
# 'sphinx',
# 'south',
Expand Down
5 changes: 4 additions & 1 deletion userena/managers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from django.db import models
from django.db.models import Q
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.models import UserManager, Permission, AnonymousUser
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext as _
Expand Down Expand Up @@ -206,7 +207,9 @@ def check_permissions(self):
if model == 'profile':
model_obj = get_profile_model()
else: model_obj = get_user_model()

model_content_type = ContentType.objects.get_for_model(model_obj)

for perm in perms:
try:
Permission.objects.get(codename=perm[0],
Expand All @@ -222,7 +225,7 @@ def check_permissions(self):
for user in get_user_model().objects.exclude(id=settings.ANONYMOUS_USER_ID):
try:
user_profile = user.get_profile()
except get_profile_model().DoesNotExist:
except ObjectDoesNotExist:
warnings.append(_("No profile found for %(username)s") \
% {'username': user.username})
else:
Expand Down

0 comments on commit 6123415

Please sign in to comment.