From 008afa68b9d2838627c5d6229bc57d37d6632de7 Mon Sep 17 00:00:00 2001 From: farhaanbukhsh Date: Dec 24 2015 09:22:01 +0000 Subject: Improving the code --- diff --git a/pagure/ui/fork.py b/pagure/ui/fork.py index d6e4a9e..24f6602 100644 --- a/pagure/ui/fork.py +++ b/pagure/ui/fork.py @@ -31,10 +31,12 @@ def _get_parent_repo_path(repo): """ Return the path of the parent git repository corresponding to the provided Repository object from the DB. """ - if repo.parent or repo.is_fork: + if repo.parent: parentpath = os.path.join(APP.config['GIT_FOLDER'], repo.parent.path) if repo.parent.is_fork: parentpath = os.path.join(APP.config['FORK_FOLDER'], repo.parent.path) + elif repo.is_fork: + parentpath = os.path.join(APP.config['FORK_FOLDER'], repo.path) else: parentpath = os.path.join(APP.config['GIT_FOLDER'], repo.path)