Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acesso ao admin como usuário anônimo gera erro #582

Open
brunosmartin opened this issue Mar 16, 2016 · 0 comments
Open

Acesso ao admin como usuário anônimo gera erro #582

brunosmartin opened this issue Mar 16, 2016 · 0 comments

Comments

@brunosmartin
Copy link
Member

http://localhost:8080/admin/courses/1/

Deveria gerar um forbiden (403)

Internal Server Error: /admin/course/1/certificatesettings/
Traceback (most recent call last):
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, in get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
return self.dispatch(request, _args, *_kwargs)
File "/home/bruno/devel/timtec/administration/views.py", line 78, in dispatch
if not (request.user.is_superuser or self.object.get_professor_role(request.user) == 'coordinator'):
File "/home/bruno/devel/timtec/core/models.py", line 196, in get_professor_role
cp = self.course_professors.get(user=user)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(_args, *_kwargs)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/query.py", line 325, in get
clone = self.filter(_args, *_kwargs)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/query.py", line 679, in filter
return self._filter_or_exclude(False, _args, *_kwargs)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/query.py", line 697, in _filter_or_exclude
clone.query.add_q(Q(_args, *_kwargs))
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1310, in add_q
clause, require_inner = self._add_q(where_part, self.used_aliases)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1338, in _add_q
allow_joins=allow_joins, split_subq=split_subq,
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/sql/query.py", line 1200, in build_filter
lookups, value)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/fields/related.py", line 1745, in get_lookup_constraint
lookup_class(target.get_col(alias, source), val), AND)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/lookups.py", line 101, in init
self.rhs = self.get_prep_lookup()
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/lookups.py", line 139, in get_prep_lookup
return self.lhs.output_field.get_prep_lookup(self.lookup_name, self.rhs)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/fields/init.py", line 727, in get_prep_lookup
return self.get_prep_value(value)
File "/home/bruno/.virtualenvs/timtec-novo/lib/python2.7/site-packages/django/db/models/fields/init.py", line 985, in get_prep_value
return int(value)
TypeError: int() argument must be a string or a number, not 'SimpleLazyObject'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant