Skip to content
espenak edited this page Feb 13, 2012 · 4 revisions

After manually changing the following attributes in the database:

  • full_name in CoreDevilryUserProfile
  • email, or username in AuthUser

you have to sync these changes with the CoreCandidate table using:

bin/django_production.py devilry_sync_candidates

Why?

CoreCandidate double-stores full_name, email and username (in identifier) for non-anonymous assignments. For anonymous assignments, full_name and email fields are blank, and identifier is the candidate ID. This means that it is always safe to provide examiners with the data in CoreCandidate.

When changes to CoreDevilryUserProfile or AuthUser are performed using the Django ORM (such as with the django_production.py scripts), post-save hooks makes these changes automatically.

The code responsible for this logic

https://github.com/devilry/devilry-django/blob/latest-stable/devilry/apps/core/models/candidate.py should be quite readable even if you do not know Python.

Clone this wiki locally