Skip to content

Commit

Permalink
fix size again
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed Aug 21, 2023
1 parent 61c9ed9 commit 35572c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion flask_appbuilder/security/mongoengine/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class User(Document):
username = StringField(max_length=64, required=True, unique=True)
password = StringField(max_length=256)
active = BooleanField()
email = StringField(max_length=254, required=True, unique=True)
email = StringField(max_length=320, required=True, unique=True)
last_login = DateTimeField()
login_count = IntField()
fail_login_count = IntField()
Expand Down
10 changes: 3 additions & 7 deletions flask_appbuilder/security/sqla/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,13 @@ class User(Model):
username = Column(String(64), unique=True, nullable=False)
password = Column(String(256))
active = Column(Boolean)
email = Column(String(254), unique=True, nullable=False)
email = Column(String(320), unique=True, nullable=False)
last_login = Column(DateTime)
login_count = Column(Integer)
fail_login_count = Column(Integer)
roles = relationship("Role", secondary=assoc_user_role, backref="user")
created_on = Column(
DateTime, default=lambda: datetime.datetime.now(), nullable=True
)
changed_on = Column(
DateTime, default=lambda: datetime.datetime.now(), nullable=True
)
created_on = Column(DateTime, default=lambda: datetime.datetime.now(), nullable=True)
changed_on = Column(DateTime, default=lambda: datetime.datetime.now(), nullable=True)

@declared_attr
def created_by_fk(self):
Expand Down

0 comments on commit 35572c0

Please sign in to comment.