martin-bts / askbot-devel

Askbot is a Django/Python Q&A forum. **Contributors README**: https://github.com/ASKBOT/askbot-devel#how-to-contribute. Commercial hosting of Askbot and support are available at https://askbot.com
Other
0 stars 2 forks source link

ValueError: auth.models.User is not saved, cant make cache key #10

Closed sebastian-philipp closed 5 years ago

sebastian-philipp commented 5 years ago
======================================================================
ERROR: test_answer_to_group_question_is_not_globally_visible (askbot.tests.test_thread_model.ThreadModelTestsWithGroupsEnabled)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/tests/test_thread_model.py", line 12, in setUp
    self.admin = self.create_user('admin', status = 'd')
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/tests/utils.py", line 162, in create_user
    reputation=reputation
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/tests/utils.py", line 77, in create_user
    user = models.User.objects.create_user(username, email, status=status)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/django/contrib/auth/models.py", line 159, in create_user
    return self._create_user(username, email, password, **extra_fields)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/django/contrib/auth/models.py", line 151, in _create_user
    user = self.model(username=username, email=email, **extra_fields)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/django/contrib/auth/base_user.py", line 68, in __init__
    super(AbstractBaseUser, self).__init__(*args, **kwargs)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/django/db/models/base.py", line 568, in __init__
    _setattr(self, prop, kwargs[prop])
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/models/user_profile.py", line 53, in setter
    profile = get_profile(user)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/models/user_profile.py", line 35, in get_profile
    key = get_profile_cache_key(user)
  File "/home/sebastian/Repos/askbot-devel/.tox/py2.7/local/lib/python2.7/site-packages/askbot/models/user_profile.py", line 17, in get_profile_cache_key
    raise ValueError('auth.models.User is not saved, cant make cache key')
ValueError: auth.models.User is not saved, cant make cache key
sebastian-philipp commented 5 years ago

my fault