Merged add_tags and lib.search into lib.tags.
[zzz-floof.git] / floof / controllers / art.py
index ee1e4ad..bf928f0 100644 (file)
@@ -18,7 +18,6 @@ import elixir
 import os.path
 import PIL
 import PIL.Image
 import os.path
 import PIL
 import PIL.Image
-from sqlalchemy import func
 from sqlalchemy.exceptions import IntegrityError
 from sqlalchemy.orm.exc import NoResultFound
 from wtforms.validators import ValidationError
 from sqlalchemy.exceptions import IntegrityError
 from sqlalchemy.orm.exc import NoResultFound
 from wtforms.validators import ValidationError
@@ -139,8 +138,7 @@ class ArtController(BaseController):
     def watchstream(self, name):
         """Watchstream for a certain user."""
         try:
     def watchstream(self, name):
         """Watchstream for a certain user."""
         try:
-            c.watching_user = User.query.filter(func.lower(User.name) == name) \
-                                  .one()
+            c.watching_user = User.get_by(name=name)
         except NoResultFound:
             abort(404)
 
         except NoResultFound:
             abort(404)