fedora-infra / fas

Fedora Account System
https://admin.fedoraproject.org/accounts
GNU General Public License v2.0
40 stars 50 forks source link

Creating a new group fails #253

Closed ryanlerch closed 7 years ago

ryanlerch commented 7 years ago

Trying to create a new group fails.

Steps to reproduce

  1. Log into FAS3 as a user that has permissions to create a group. In the test setup, i used "fasadmin"
  2. go to: http://localhost:5002/settings/add/group
  3. Fill out the top 3 fields, Name, Display Name, and Description.
  4. Save the changes.

The following error is raised:

2017-01-27 13:01:35,372 ERROR [waitress:10911][waitress:channel][service:341] Exception when serving /settings/add/group
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/waitress/channel.py", line 338, in service
    task.service()
  File "/usr/lib/python2.7/site-packages/waitress/task.py", line 169, in service
    self.execute()
  File "/usr/lib/python2.7/site-packages/waitress/task.py", line 399, in execute
    app_iter = self.channel.server.application(env, start_response)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 233, in __call__
    response = self.invoke_subrequest(request, use_tweens=True)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 208, in invoke_subrequest
    response = handle_request(request)
  File "/usr/lib/python2.7/site-packages/pyramid_debugtoolbar/toolbar.py", line 187, in toolbar_tween
    return handler(request)
  File "/usr/lib/python2.7/site-packages/pyramid/tweens.py", line 62, in excview_tween
    reraise(*attrs['exc_info'])
  File "/usr/lib/python2.7/site-packages/pyramid/tweens.py", line 22, in excview_tween
    response = handler(request)
  File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 119, in tm_tween
    reraise(*exc_info)
  File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 98, in tm_tween
    response = handler(request)
  File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 155, in handle_request
    view_name
  File "/usr/lib/python2.7/site-packages/pyramid/view.py", line 612, in _call_view
    response = view_callable(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/viewderivers.py", line 300, in secured_view
    return view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/viewderivers.py", line 438, in rendered_view
    result = view(context, request)
  File "/usr/lib/python2.7/site-packages/pyramid/viewderivers.py", line 123, in _class_requestonly_view
    response = getattr(inst, attr)()
  File "/vagrant/fas/views/admin.py", line 157, in add_group
    group = register.add_group(form)
  File "/vagrant/fas/models/register.py", line 173, in add_group
    group.group_type = form.group_type.data
AttributeError: 'EditGroupForm' object has no attribute 'group_type'