[Update] 去掉debug信息

pull/1651/head
ibuler 2018-08-07 18:38:46 +08:00
parent 337338ebf3
commit ccc292d9a9
2 changed files with 0 additions and 4 deletions

View File

@ -79,7 +79,6 @@ class AdminUserRequiredMixin(UserPassesTestMixin):
return True
def dispatch(self, request, *args, **kwargs):
print("Current org: {}".format(current_org))
if not request.user.is_authenticated:
return super().dispatch(request, *args, **kwargs)
@ -92,6 +91,4 @@ class AdminUserRequiredMixin(UserPassesTestMixin):
print("Is org admin")
return redirect('orgs:switch-a-org')
return HttpResponseForbidden()
else:
print(current_org.can_admin_by(request.user))
return super().dispatch(request, *args, **kwargs)

View File

@ -43,7 +43,6 @@ class OrgManager(models.Manager):
def all(self):
if not current_org:
msg = 'You can `objects.set_current_org(org).all()` then run it'
warnings.warn(msg)
return self
else:
return super(OrgManager, self).all()