Change the ServiceEmailReplyTo model to uselist for the backref to services (allow 0 to many reply to emails)

Add another assert in the test
This commit is contained in:
Rebecca Law
2017-09-12 09:50:52 +01:00
committed by Katie Smith
parent 269e88f7de
commit d356957974
2 changed files with 7 additions and 3 deletions

View File

@@ -1337,7 +1337,7 @@ class ServiceEmailReplyTo(db.Model):
id = db.Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
service_id = db.Column(UUID(as_uuid=True), db.ForeignKey('services.id'), unique=False, index=True, nullable=False)
service = db.relationship(Service, backref=db.backref("reply_to_email_addresses", uselist=False))
service = db.relationship(Service, backref=db.backref("reply_to_email_addresses"))
email_address = db.Column(db.Text, nullable=False, index=False, unique=False)
is_default = db.Column(db.Boolean, nullable=False, default=True)