temporarily revert to case insensitive tag filter
[mediagoblin-libreplanet.git] / mediagoblin_libreplanet / lp_helper.py
index 9e50146596b6959f6216cc38710d032dabcc7889..63d130465bf88fd447455db0214b4448d3fe3f6a 100644 (file)
 # You should have received a copy of the GNU Affero General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+from mediagoblin.db.models import MediaEntry, Tag, MediaTag
+
 def media_entries_for_tag_slug_case_insensitive(dummy_db, tag_slug):
     return MediaEntry.query \
         .join(MediaEntry.tags_helper) \
         .join(MediaTag.tag_helper) \
         .filter(
             (MediaEntry.state == u'processed')
-            & (Tag.slug.lower() == tag_slug.lower()))
+            & (Tag.slug.lower() == tag_slug.lower())) # Tag.slug.lower() currently doesn't work.