Commits

Chris McDonough committed aa85c61 Draft

remove unused mentions of url, fix ordering of mentioning url vs. using it

Comments (0)

Files changed (1)

src/stage3/birdie/views.py

     matchdict = request.matchdict
     other_userid = matchdict.get('userid')
     other_user = dbsession.query(User).filter_by(userid=other_userid).first()
+    url = route_url('users', request, userid=other_userid)
     if other_user is None:
         return HTTPNotFound(location=url)
-    url = route_url('users', request, userid=other_userid)
     chirps = dbsession.query(Chirp).filter(Chirp.author==other_user)
     chirps = chirps.order_by(Chirp.timestamp.desc()).limit(30)
     follows = dbsession.query(Follower).filter(Follower.follower==other_user.id)
     matchdict = request.matchdict
     other_userid = matchdict.get('userid')
     other_user = dbsession.query(User).filter_by(userid=other_userid).first()
-    url = route_url('users', request, userid=other_userid)
     follower = user.id
     follows = other_user.id
     new_follower = Follower(follower, follows)
     matchdict = request.matchdict
     other_userid = matchdict.get('userid')
     other_user = dbsession.query(User).filter_by(userid=other_userid).first()
-    url = route_url('users', request, userid=other_userid)
     follower = user.id
     follows = other_user.id
     dbsession.query(Follower).filter(Follower.follower==follower).filter(Follower.follows==follows).delete()
     return HTTPFound(location = '/')
-    return HTTPFound(location = user_url)