Set data to non-nullable

This commit is contained in:
Adrià Casajús 2022-04-22 14:53:04 +02:00
parent 89d94963d7
commit fcd2ab6fed
No known key found for this signature in database
GPG Key ID: F0033226A5AFC9B9
1 changed files with 2 additions and 1 deletions

View File

@ -2914,7 +2914,7 @@ class AdminAuditLog(Base):
action = sa.Column(sa.Integer, nullable=False)
model = sa.Column(sa.Text, nullable=False)
model_id = sa.Column(sa.Integer, nullable=True)
data = sa.Column(sa.JSON, nullable=True)
data = sa.Column(sa.JSON, nullable=False)
admin = orm.relationship(User, foreign_keys=[admin_user_id])
@ -2974,6 +2974,7 @@ class AdminAuditLog(Base):
action=AuditLogActionEnum.logged_as_user.value,
model="User",
model_id=user_id,
data={},
)
@classmethod