Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : master
---------------------------------------------------------------
commit 6dbd19408e10f69e9bcec3c58a88e0a94ceac73c
Author: Valentin Gologuzov <vgologuz(a)redhat.com>
Date: Wed Jul 1 13:31:02 2015 +0200
[frontend] fix tests for old f20
---------------------------------------------------------------
.../coprs_frontend/coprs/logic/builds_logic.py | 1 +
frontend/coprs_frontend/coprs/models.py | 3 +--
test_suite.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/logic/builds_logic.py
b/frontend/coprs_frontend/coprs/logic/builds_logic.py
index 3bd32a7..cc44a9b 100644
--- a/frontend/coprs_frontend/coprs/logic/builds_logic.py
+++ b/frontend/coprs_frontend/coprs/logic/builds_logic.py
@@ -133,6 +133,7 @@ class BuildsLogic(object):
memory_reqs=None, timeout=None, enable_net=True):
if chroots is None:
chroots = []
+
coprs_logic.CoprsLogic.raise_if_unfinished_blocking_action(
user, copr,
"Can't build while there is an operation in progress:
{action}")
diff --git a/frontend/coprs_frontend/coprs/models.py
b/frontend/coprs_frontend/coprs/models.py
index e6dd386..818f7ae 100644
--- a/frontend/coprs_frontend/coprs/models.py
+++ b/frontend/coprs_frontend/coprs/models.py
@@ -69,9 +69,8 @@ class User(db.Model, helpers.Serializer):
"""
Determine if this user can build in the given copr.
"""
-
can_build = False
- if copr.owner == self:
+ if copr.owner_id == self.id:
can_build = True
if (self.permissions_for_copr(copr) and
self.permissions_for_copr(copr).copr_builder ==
diff --git a/test_suite.sh b/test_suite.sh
index 440fa90..ca50848 100644
--- a/test_suite.sh
+++ b/test_suite.sh
@@ -7,7 +7,7 @@ REDIS_PORT=7777
redis-server --port $REDIS_PORT &> _redis.log &
-virtualenv _venv
+virtualenv _venv -p /usr/bin/python2.7
source _venv/bin/activate