title: Why doesn't flask sql alchemy update an attribute for a record?
body: <p>I have a class shown below:</p>
  
  <pre><code>class Account(db.Model, flask_login.UserMixin):
      __tablename__ = 'account'
      id = db.Column(db.Integer, primary_key=True)
      email = db.Column(db.String(75))
      username = db.Column(db.String(50))
      password = db.Column(db.String(250))
      admin = db.Column(db.Boolean)
  
      def __init__(self, email='', username='', password='', admin=None):
          self.email = email
          self.username = username
          self.password = password
          self.admin = admin
  
      def __repr__(self):
          return '&lt;Account %r&gt;' % self.username
  </code></pre>
  
  <p>When I create an account through a form, the admin attribute will be <code>None</code>. However when I access the database and try to manually set it to <code>True</code>, the attribute will update but when I access the database again, the attribute is <code>None</code> It's super annoying.</p>
  
  <p>Here is what I execute on the console:</p>
  
  <pre><code>account = Account.query.get(1)
  account.admin = True
  db.session.commit()
  db.admin ----&gt; True
  
  exit()
  
  #restart again
  account = Account.query.get(1)
  account.admin ----&gt; None
  </code></pre>
  
  <p>What am I doing wrong?</p>