Error submitting private forum permissions

VERIFIED WORKSFORME

Status

support.mozilla.org
Forum
--
major
VERIFIED WORKSFORME
8 years ago
8 years ago

People

(Reporter: rbillings, Unassigned)

Tracking

unspecified
2.2.2
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

8 years ago
Error occurs when saving private forum permissions.

1. django > In Django admin, go to (Authority) Permissions.
2. Add a new permission:
   Codename: forums_forum.post_in_forum
   Content type: forum (the 2nd one)
   Object ID: the forum you want to privatize
   Approved: X
   User or Group: whoever you want to grant access to
3. Click Save

ERROR:

  File "/data/virtualenvs/kitsune/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/contrib/admin/options.py", line 239, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/views/decorators/cache.py", line 69, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/contrib/admin/sites.py", line 190, in inner
    return view(request, *args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/utils/decorators.py", line 21, in _wrapper
    return decorator(bound_func)(*args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/utils/decorators.py", line 17, in bound_func
    return func(self, *args2, **kwargs2)

  File "/data/virtualenvs/kitsune/src/django/django/db/transaction.py", line 299, in _commit_on_success
    res = func(*args, **kw)

  File "/data/virtualenvs/kitsune/src/django/django/contrib/admin/options.py", line 777, in add_view
    if form.is_valid():

  File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 121, in is_valid
    return self.is_bound and not bool(self.errors)

  File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 112, in _get_errors
    self.full_clean()

  File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 267, in full_clean
    self._clean_fields()

  File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 284, in _clean_fields
    value = field.clean(value)

  File "/data/virtualenvs/kitsune/src/django/django/forms/fields.py", line 162, in clean
    value = self.to_python(value)

  File "/data/virtualenvs/kitsune/src/django/django/forms/models.py", line 989, in to_python
    value = self.queryset.get(**{key: value})

  File "/data/virtualenvs/kitsune/src/django/django/db/models/query.py", line 333, in get
    clone = self.filter(*args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/query.py", line 550, in filter
    return self._filter_or_exclude(False, *args, **kwargs)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/query.py", line 568, in _filter_or_exclude
    clone.query.add_q(Q(*args, **kwargs))

  File "/data/virtualenvs/kitsune/src/django/django/db/models/sql/query.py", line 1131, in add_q
    can_reuse=used_aliases)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/sql/query.py", line 1071, in add_filter
    connector)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/sql/where.py", line 66, in add
    value = obj.prepare(lookup_type, value)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/sql/where.py", line 299, in prepare
    return self.field.get_prep_lookup(lookup_type, value)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/fields/__init__.py", line 292, in get_prep_lookup
    return self.get_prep_value(value)

  File "/data/virtualenvs/kitsune/src/django/django/db/models/fields/__init__.py", line 476, in get_prep_value
    return int(value)

ValueError: invalid literal for int() with base 10: 'rbillings'
Rebecca: you're supposed to use an integer (user id) for the user. Use the magnifier to look it up.
(Reporter)

Comment 2

8 years ago
That worked! Django admin learning curve.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
(Reporter)

Updated

8 years ago
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.