<commit_before># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models

class Migration(DataMigration):

    def forwards(self, orm):
        """
        Set course authors
        """
        for course_professor in orm.CourseProfessor.objects.all():
            if course_professor.role == 'instructor':
                try:
                    user = course_professor.user
                except models.FieldDoesNotExist:
                    user = None
                orm.CourseAuthor.objects.create(
                    user=course_professor.user,
                    course=course_professor.course,
                    biography=course_professor.biography,
                    picture=course_professor.picture,
                    name=course_professor.name
                )
                course_professor.delete()

    def backwards(self, orm):
        for course_author in orm.CourseAuthor.objects.all():
            course_author.delete()

    models = {
        u'accounts.timtecuser': {
            'Meta': {'object_name': 'TimtecUser'},
            'accepted_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),<commit_msg>realy fix migration<commit_after># -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models

class Migration(DataMigration):

    def forwards(self, orm):
        """
        Set course authors
        """
        for course_professor in orm.CourseProfessor.objects.all():
            if course_professor.role == 'instructor':
                try:
                    user = course_professor.user
                except:
                    user = None
                orm.CourseAuthor.objects.create(
                    user=course_professor.user,
                    course=course_professor.course,
                    biography=course_professor.biography,
                    picture=course_professor.picture,
                    name=course_professor.name
                )
                course_professor.delete()

    def backwards(self, orm):
        for course_author in orm.CourseAuthor.objects.all():
            course_author.delete()

    models = {
        u'accounts.timtecuser': {
            'Meta': {'object_name': 'TimtecUser'},
            'accepted_terms': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
            'biography': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
            'city': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
            'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
            'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
{'fraction_non_alphanumeric': 0.13719603722605825, 'fraction_numerical': 0.003602521765235665, 'mean_word_length': 2.1227741330834116, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5007045', 'n_tokens_mistral': 949, 'n_tokens_neox': 876, 'n_words': 174}