[Getan-commits] [PATCH 08 of 16] Pass the Backend to the Project constructor
Wald Commits
scm-commit at wald.intevation.org
Mon Mar 3 15:00:39 CET 2014
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1393853228 -3600
# Node ID 5ded6192b85b5e4bd25ded4abbf57fcc453993a4
# Parent 2e7885dc66695c69c9c71741f61921979b561375
Pass the Backend to the Project constructor
This change will allow lazy loading of Project Entries.
diff -r 2e7885dc6669 -r 5ded6192b85b getan/backend.py
--- a/getan/backend.py Mon Mar 03 14:26:14 2014 +0100
+++ b/getan/backend.py Mon Mar 03 14:27:08 2014 +0100
@@ -213,8 +213,7 @@
if not row[1]:
raise InvalidProjectKeyError("Project with id %s needs "
"a key" % row[0])
- proj = Project(*row)
- proj.entries = self.load_entries(proj.id)
+ proj = Project(self, *row)
projects.append(proj)
logger.info("found %i active projects." % len(projects))
More information about the Getan-commits
mailing list