X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/490b45cdc311a09db0266a3f974289e3979bf2ea..79cb1c0d3048c165fd3b9ff287ee1fbe361f904d:/floof/controllers/relation.py?ds=sidebyside diff --git a/floof/controllers/relation.py b/floof/controllers/relation.py index 719fe2b..330559e 100644 --- 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__) -from floof.model import Art, UserRelation +from floof.model import Art, UserRelationship 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. - prior_relation = UserRelation.get_by(art=art, user=user) + prior_relation = UserRelationship.get_by(art=art, user=user) if prior_relation: abort(404) ## should be a validation error - relation = UserRelation(user=user, kind=kind, art=art, creator=c.user) + relation = UserRelationship(user=user, kind=kind, art=art, creator=c.user) elixir.session.commit() redirect(url('show_art', id=art_id))