changeset 353:5ded6192b85b

Pass the Backend to the Project constructor This change will allow lazy loading of Project Entries.
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 03 Mar 2014 14:27:08 +0100 (2014-03-03)
parents 2e7885dc6669
children 4f5094f3f615
files getan/backend.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)