Add pgp_public_key,pgp_finger_print columns to Contact model

This commit is contained in:
Son NK 2020-06-07 00:04:59 +02:00
parent 49a81db951
commit c593253c7d
1 changed files with 7 additions and 0 deletions

View File

@ -933,9 +933,16 @@ class Contact(db.Model, ModelMixin):
# whether a contact is created via CC
is_cc = db.Column(db.Boolean, nullable=False, default=False, server_default="0")
pgp_public_key = db.Column(db.Text, nullable=True)
pgp_finger_print = db.Column(db.String(512), nullable=True)
alias = db.relationship(Alias)
user = db.relationship(User)
@property
def email(self):
return self.website_email
def website_send_to(self):
"""return the email address with name.
to use when user wants to send an email from the alias