mirror of
https://github.com/Mailu/Mailu.git
synced 2025-01-16 02:46:44 +02:00
fix bugs in model and schema introduced by #1604
This commit is contained in:
parent
7481a6d272
commit
92896ae646
@ -628,10 +628,10 @@ class Alias(Base, Email):
|
||||
sqlalchemy.and_(cls.domain_name == domain_name,
|
||||
sqlalchemy.or_(
|
||||
sqlalchemy.and_(
|
||||
cls.wildcard is False,
|
||||
cls.wildcard == False,
|
||||
cls.localpart == localpart
|
||||
), sqlalchemy.and_(
|
||||
cls.wildcard is True,
|
||||
cls.wildcard == True,
|
||||
sqlalchemy.bindparam('l', localpart).like(cls.localpart)
|
||||
)
|
||||
)
|
||||
@ -643,10 +643,10 @@ class Alias(Base, Email):
|
||||
sqlalchemy.and_(cls.domain_name == domain_name,
|
||||
sqlalchemy.or_(
|
||||
sqlalchemy.and_(
|
||||
cls.wildcard is False,
|
||||
cls.wildcard == False,
|
||||
sqlalchemy.func.lower(cls.localpart) == localpart_lower
|
||||
), sqlalchemy.and_(
|
||||
cls.wildcard is True,
|
||||
cls.wildcard == True,
|
||||
sqlalchemy.bindparam('l', localpart_lower).like(
|
||||
sqlalchemy.func.lower(cls.localpart))
|
||||
)
|
||||
|
@ -590,7 +590,7 @@ class DkimKeyField(fields.String):
|
||||
value = value[:pos]
|
||||
else:
|
||||
footer = '-----END PRIVATE KEY-----'
|
||||
except ValueError:
|
||||
except ValueError as exc:
|
||||
raise ValidationError(f'invalid dkim key {bad_key!r}') from exc
|
||||
|
||||
# remove whitespace from key data
|
||||
|
Loading…
Reference in New Issue
Block a user