diff --git a/progit/app.py b/progit/app.py index 77201d5..fb6214a 100644 --- a/progit/app.py +++ b/progit/app.py @@ -103,7 +103,6 @@ def view_user(username): repo_start = limit * (repopage - 1) fork_start = limit * (forkpage - 1) - repos = progit.lib.list_projects( SESSION, username=flask.g.fas_user.username, @@ -234,7 +233,6 @@ def view_repo_branch(repo, branchname): repo_obj = pygit2.Repository(os.path.join(APP.config["GIT_FOLDER"], repo.path)) - if not branchname in repo_obj.listall_branches(): flask.abort(404) diff --git a/progit/lib.py b/progit/lib.py index 0cc8372..06683c1 100644 --- a/progit/lib.py +++ b/progit/lib.py @@ -99,8 +99,8 @@ def list_projects( model.Project.parent_id != None ) elif fork is False: - projects = projects.filter_by( - parent_id = None + projects = projects.filter( + model.Project.parent_id == None ) if start is not None: diff --git a/progit/model.py b/progit/model.py index 1478c2f..946615e 100644 --- a/progit/model.py +++ b/progit/model.py @@ -91,6 +91,7 @@ class Project(BASE): def path(self): return "%s.git" % self.name + class Comment(BASE): """ Stores the comments made on a commit/file.