[traceback] AbuseReport.profile" must be a "UserProfile" instance.

VERIFIED FIXED

Status

VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: tasos, Assigned: tasos)

Tracking

2016-9.3

Details

(Whiteboard: [qa-])

(Assignee)

Description

2 years ago
Traceback (most recent call last):
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/newrelic-2.52.0.40/newrelic/hooks/application_celery.py", line 66, in wrapper
    return wrapped(*args, **kwargs)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__
    return self.run(*args, **kwargs)
  File "/data/www/mozillians.org/mozillians/mozillians/users/tasks.py", line 305, in check_spam_account
    AbuseReport.objects.get_or_create(**kwargs)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/manager.py", line 127, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/query.py", line 407, in get_or_create
    return self._create_object_from_params(lookup, params)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/query.py", line 439, in _create_object_from_params
    obj = self.create(**params)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/query.py", line 346, in create
    obj = self.model(**kwargs)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/base.py", line 468, in __init__
    setattr(self, field.name, rel_obj)
  File "/data/www/mozillians.org/venv/lib/python2.7/site-packages/django/db/models/fields/related.py", line 639, in __set__
    self.field.rel.to._meta.object_name,
ValueError: Cannot assign "[<UserProfile: Foo Bar>]": "AbuseReport.profile" must be a "UserProfile" instance.
(Assignee)

Updated

2 years ago
Status: NEW → ASSIGNED

Comment 1

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

https://github.com/mozilla/mozillians/commit/2f4c93b23888fa5b2ea75783838fc330b3ada09d
[fix bug 1305939] Fix UserProfile query in spam celery task.

https://github.com/mozilla/mozillians/commit/45387b06d5b3534dbba55dc4da78a8bbd10bf59f
Merge pull request #1528 from akatsoulas/1305939-celery-traceback

[fix bug 1305939] Fix UserProfile query in spam celery task.

Updated

2 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Comment 2

2 years ago
Verified as [qa-].
Status: RESOLVED → VERIFIED
Whiteboard: [qa-]
(Assignee)

Updated

2 years ago
Version: other → 2016-9.3
You need to log in before you can comment on or make changes to this bug.