From f3f2fead2cf212d4bbefc4ec52da99d6132e9f27 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 24 2014 12:37:12 +0000 Subject: Add a back reference from the project to its forks --- diff --git a/progit/model.py b/progit/model.py index 7ffed22..be6a4a6 100644 --- a/progit/model.py +++ b/progit/model.py @@ -87,7 +87,7 @@ class Project(BASE): date_created = sa.Column(sa.DateTime, nullable=False, default=datetime.datetime.utcnow) - parent = relation('Project', remote_side=[id]) + parent = relation('Project', remote_side=[id], backref='forks') @property def path(self):