You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a group, if you select both a Project and a Component then the following exception is given
Exception Type: ValueError
Exception Value: 'GroupForm' has no field named 'project'.
Exception Location: /home/weblate/weblate-env/lib/python3.7/site-packages/django/forms/forms.py, line 344, in add_error
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.7.3
Python Path:
['/',
'/home/weblate/weblate-env/lib/python3.7/site-packages/git/ext/gitdb',
'.',
'',
'/home/weblate/weblate-env/lib/python37.zip',
'/home/weblate/weblate-env/lib/python3.7',
'/home/weblate/weblate-env/lib/python3.7/lib-dynload',
'/usr/lib/python3.7',
'/home/weblate/weblate-env/lib/python3.7/site-packages',
'/home/weblate/weblate-env/lib/python3.7/site-packages/gitdb/ext/smmap']```
{project: [ValidationError(['This is not used when a component is selected.'])]}
Unhandled 'GroupForm' has no field named 'project'.
### I already tried
- [X] I've read and searched [the documentation](https://docs.weblate.org/).
- [X] I've searched for similar issues in this repository.
### Steps to reproduce the behavior
1. Create a new group or edit an existing one
2. Select a project from the list
3. Select a component from the list (doesn't matter if it's under that project or another)
### Expected behavior
It is expected to either get a user friendly error in case that is not supported or save successfully.
You should be able to allow access to specific Projects and Components. One might want to grant access to Project A but only component X of Project B. Now this doesn't seem to be possible.
### Screenshots
_No response_
### Exception traceback
```pytb
ValidationError: {'project': ['This is not used when a component is selected.']}
File "django/forms/forms.py", line 400, in _clean_form
cleaned_data = self.clean()
File "weblate/auth/admin.py", line 211, in clean
{"project": _("This is not used when a component is selected.")}
ValueError: 'GroupForm' has no field named 'project'.
File "django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "django/contrib/admin/options.py", line 616, in wrapper
return self.admin_site.admin_view(view)(*args, **kwargs)
File "django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "django/views/decorators/cache.py", line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "django/contrib/admin/sites.py", line 232, in inner
return view(request, *args, **kwargs)
File "django/contrib/admin/options.py", line 1660, in change_view
return self.changeform_view(request, object_id, form_url, extra_context)
File "django/utils/decorators.py", line 43, in _wrapper
return bound_method(*args, **kwargs)
File "django/utils/decorators.py", line 130, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "django/contrib/admin/options.py", line 1540, in changeform_view
return self._changeform_view(request, object_id, form_url, extra_context)
File "django/contrib/admin/options.py", line 1579, in _changeform_view
form_validated = form.is_valid()
File "django/forms/forms.py", line 175, in is_valid
return self.is_bound and not self.errors
File "django/forms/forms.py", line 170, in errors
self.full_clean()
File "django/forms/forms.py", line 373, in full_clean
self._clean_form()
File "django/forms/forms.py", line 402, in _clean_form
self.add_error(None, e)
File "django/forms/forms.py", line 344, in add_error
"'%s' has no field named '%s'." % (self.__class__.__name__, field))
WARNINGS:
?: (weblate.W025.fluent) Failure in loading handler for fluent file format: No module named 'fluent'
HINT: https://docs.weblate.org/en/latest/admin/install.html#optional-deps
?: (weblate.W033.Gerrit) Failure in loading VCS module for Gerrit: git: 'review' is not a git command. See 'git --help'.
(1)
HINT: https://docs.weblate.org/en/latest/vcs.html
?: (weblate.W033.Subversion) Failure in loading VCS module for Subversion: git: 'svn' is not a git command. See 'git --help'.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the issue
When editing a group, if you select both a Project and a Component then the following exception is given
How do you run Weblate?
PyPI module
Weblate versions
Weblate deploy checks
Additional context
No response
The text was updated successfully, but these errors were encountered: