diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py index 038534b47..34f3e1521 100644 --- a/frontend/coprs_frontend/coprs/models.py +++ b/frontend/coprs_frontend/coprs/models.py @@ -345,6 +345,8 @@ class _CoprPublic(db.Model, helpers.Serializer): group_id = db.Column(db.Integer, db.ForeignKey("group.id")) forked_from_id = db.Column(db.Integer, db.ForeignKey("copr.id")) + actions = db.relationship(back_populates="copr") + # enable networking for the builds by default build_enable_net = db.Column(db.Boolean, default=True, server_default="1", nullable=False) @@ -2139,6 +2141,9 @@ class Action(db.Model, helpers.Serializer): # time ended as returned by int(time.time()) ended_on = db.Column(db.Integer, index=True) + copr_id = db.Column(db.Integer, db.ForeignKey("copr.id")) + copr = db.relationship(back_populates="actions") + def __str__(self): return self.__unicode__()