Status

VERIFIED FIXED
5 years ago
4 years ago

People

(Reporter: sancus, Assigned: dpoirier)

Tracking

2014-02.1

Details

(Whiteboard: [kb=1250266] )

(Reporter)

Description

5 years ago
Trying to merge groups is producing tracebacks, such as this one:

Traceback (most recent call last):

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/api/object_wrapper.py", line 237, in __call__
    self._nr_instance, args, kwargs, **self._nr_kwargs)

  File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 475, in wrapper
    return wrapped(*args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/contrib/admin/options.py", line 366, in wrapper
    return self.admin_site.admin_view(view)(*args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/views/decorators/cache.py", line 89, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/contrib/admin/sites.py", line 196, in inner
    return view(request, *args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 25, in _wrapper
    return bound_func(*args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/utils/decorators.py", line 21, in bound_func
    return func(self, *args2, **kwargs2)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/db/transaction.py", line 224, in inner
    return func(*args, **kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/contrib/admin/options.py", line 1037, in change_view
    new_object = self.save_form(request, form, change=True)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/contrib/admin/options.py", line 703, in save_form
    return form.save(commit=False)

  File "/data/www/mozillians.allizom.org/mozillians/mozillians/groups/admin.py", line 91, in save
    self.instance.merge_groups(self.cleaned_data.get('merge_with', []))

  File "/data/www/mozillians.allizom.org/mozillians/mozillians/groups/models.py", line 44, in merge_groups
    group.members.values_list('id', flat=True))

  File "/data/www/mozillians.allizom.org/mozillians/mozillians/groups/models.py", line 43, in <lambda>
    map(lambda x: self.add_member(x),

  File "/data/www/mozillians.allizom.org/mozillians/mozillians/groups/models.py", line 221, in add_member
    defaults=defaults)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/db/models/manager.py", line 134, in get_or_create
    return self.get_query_set().get_or_create(**kwargs)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/db/models/query.py", line 450, in get_or_create
    obj = self.model(**params)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/db/models/base.py", line 355, in __init__
    setattr(self, field.name, rel_obj)

  File "/data/www/mozillians.allizom.org/mozillians/vendor/lib/python/django/db/models/fields/related.py", line 366, in __set__
    self.field.name, self.field.rel.to._meta.object_name))

ValueError: Cannot assign "11990L": "GroupMembership.userprofile" must be a "UserProfile" instance.
(Reporter)

Updated

5 years ago
Whiteboard: [kb=1250266]
(Reporter)

Updated

5 years ago
Blocks: 936569
(Assignee)

Updated

5 years ago
Assignee: nobody → dpoirier
Status: NEW → ASSIGNED
This is blocking launch. Sancus, r?
Flags: needinfo?(sancus)

Updated

5 years ago
Version: other → next

Comment 3

5 years ago
Commits pushed to master at https://github.com/mozilla/mozillians

https://github.com/mozilla/mozillians/commit/e659649922e193a51224ecb3b53f760dc85f903c
Fix bug 963295 - Fix group merging

https://github.com/mozilla/mozillians/commit/be76cf1e93434bf4a73e0bb0661b83da2b8b2bf3
Merge pull request #775 from caktus/963295-fix-group-merging

Fix bug 963295 - group merging
Version: next → other

Updated

5 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Version: other → next
QA verified on stage - via the admin panel group merge works minus the tracebacks
Status: RESOLVED → VERIFIED
Version: next → 2014-02.1
(Reporter)

Updated

4 years ago
Flags: needinfo?(sancus)
You need to log in before you can comment on or make changes to this bug.