title: peewee.IntegrityError: NOT NULL constraint failed
body: <p>I'm trying to create a relational database but when the constructor is called I get the following error <code>peewee.IntegrityError: NOT NULL constraint failed language.content_id</code>. I have tried on many different ways to get this done but there is a problem when calling <code>models.Language.create()</code>. The other calls to insert into the tables work just fine. Any ideas how can I fix this? Please help.</p>
  
  <p>Here is my code:</p>
  
  <p>models.py</p>
  
  <pre><code>class User(UserMixin, Model):
      username = CharField(unique=True)
      email = CharField(unique=True)
      password = CharField(max_length=100)
      joined_at = DateTimeField(default=datetime.datetime.now)
      is_admin = BooleanField(default=False)
  
      class Meta:
          database = DATABASE
          order_by = ('-joined_at',)
  
      def get_post(self):
          return Post.select().where(Post.user == self)
  
  
      @classmethod
      def create_user(cls, username, email, password, admin=False):
          try:
              cls.create(
                  username=username,
                  email=email,
                  password=generate_password_hash(password),
                  is_admin=admin)
          except IntegrityError:
              raise ValueError("User already exists")
  
  
  class Post(Model):
      content = TextField()
  
      class Meta:
          database = DATABASE
  
  class Category(Model):
      category = TextField()
  
      class Meta:
          database = DATABASE
  
  class Language(Model):
      timestamp = DateTimeField(default=datetime.datetime.now)
      content = ForeignKeyField(rel_model=Post, related_name='contents')
      category = ForeignKeyField(rel_model=Category, related_name='topic')
      user = ForeignKeyField(
          rel_model=User,
          related_name='units'
      )
      language = TextField()
  
      class Meta:
          database = DATABASE
  </code></pre>
  
  <p>app.py</p>
  
  <pre><code>@app.route('/new_post', methods=('GET', 'POST'))
  @login_required
  def post():
      form = forms.PostForm()
      if form.validate_on_submit():
          models.Post.create(content=form.content.data)
          models.Category.create(category=form.choice.data.strip())
          models.Language.create(user=g.user._get_current_object(),
                                 language=form.language.data.strip())
          flash("Message posted! Thanks!", "success")
          return redirect(url_for('index'))
      return render_template('post.html', form=form)
  </code></pre>