﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22864	syncdb/test not possible when using dynamic choices from django.contrib.auth.models.user	manuel.gysin@…	nobody	"Hello

I found an strange bug while testing around with python manage.py test.

As soon as django tries to create the database it stops with the following error:


{{{
django.db.utils.OperationalError: no such table: auth_user
}}}


Error Stack:
http://pastebin.com/pXPHkwJT

The error is caused by:

{{{
class Character(models.Model):

    def _choices_user():
        users = User.objects.all()
        users = users.order_by('id')
        return [(e.id, e.username) for e in users]

    ...
}}}

I uploaded an sample project here https://github.com/ManuelGysin/ChoicesBugDjango."	Bug	closed	Core (Management commands)	1.6	Normal	invalid			Unreviewed	0	0	0	0	0	0
