diff pylons_app/lib/utils.py @ 367:a26f48ad7a8a

fixes issue #16 reimplementation of database repository, for using generic pk instead of repo naming as pk. Which caused to many problems. Fixed issue when redirecting after repo name change to 404. Removed update hook from basic app setup
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 27 Jul 2010 14:53:22 +0200
parents 23e720be5f44
children 55377fdc1fc6
line wrap: on
line diff
--- a/pylons_app/lib/utils.py	Tue Jul 27 14:48:13 2010 +0200
+++ b/pylons_app/lib/utils.py	Tue Jul 27 14:53:22 2010 +0200
@@ -205,7 +205,7 @@
     rm = RepoModel()
     
     for name, repo in initial_repo_list.items():
-        if not sa.query(Repository).get(name):
+        if not sa.query(Repository).filter(Repository.repo_name == name).scalar():
             log.info('repository %s not found creating default', name)
                 
             form_data = {