Fix: sqlalchemy only suports str as server_default

This commit is contained in:
Adrià Casajús 2022-04-29 15:58:48 +02:00
parent e62022f032
commit baddc0fe67
No known key found for this signature in database
GPG key ID: F0033226A5AFC9B9

View file

@ -3023,7 +3023,7 @@ class ProviderComplaint(Base, ModelMixin):
user_id = sa.Column(sa.ForeignKey("users.id"), nullable=False)
state = sa.Column(sa.Integer, nullable=False)
phase = sa.Column(sa.Integer, nullable=False, server_default=Phase.unknown.value)
phase = sa.Column(sa.Integer, nullable=False, server_default=str(Phase.unknown.value))
# Point to the email that has been refused
refused_email_id = sa.Column(
sa.ForeignKey("refused_email.id", ondelete="cascade"), nullable=True