projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite runs and passes!
[zzz-floof.git]
/
floof
/
controllers
/
relation.py
diff --git
a/floof/controllers/relation.py
b/floof/controllers/relation.py
index
719fe2b
..
330559e
100644
(file)
--- a/
floof/controllers/relation.py
+++ b/
floof/controllers/relation.py
@@
-8,7
+8,7
@@
from floof.lib.base import BaseController, render
log = logging.getLogger(__name__)
log = logging.getLogger(__name__)
-from floof.model import Art, UserRelation
+from floof.model import Art, UserRelation
ship
from floof.model.users import User
import elixir
from floof.model.users import User
import elixir
@@
-21,11
+21,11
@@
class RelationController(BaseController):
user = h.get_object_or_404(User, name=request.params['username'])
## TODO: actually, this should act like a form validation.
user = h.get_object_or_404(User, name=request.params['username'])
## TODO: actually, this should act like a form validation.
- prior_relation = UserRelation.get_by(art=art, user=user)
+ prior_relation = UserRelation
ship
.get_by(art=art, user=user)
if prior_relation:
abort(404) ## should be a validation error
if prior_relation:
abort(404) ## should be a validation error
- relation = UserRelation(user=user, kind=kind, art=art, creator=c.user)
+ relation = UserRelation
ship
(user=user, kind=kind, art=art, creator=c.user)
elixir.session.commit()
redirect(url('show_art', id=art_id))
elixir.session.commit()
redirect(url('show_art', id=art_id))