From f71334ae257c860d02fd17574cb10e0866709c09 Mon Sep 17 00:00:00 2001 From: j Date: Sun, 28 Aug 2016 13:25:26 +0200 Subject: [PATCH] avoid ad --- pandora/item/models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandora/item/models.py b/pandora/item/models.py index 3bcf6283..a1020dfe 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -365,6 +365,11 @@ class Item(models.Model): update_poster = True if not settings.USE_IMDB: self.public_id = ox.toAZ(self.id) + # avoid looking like an ad + if self.id == ox.fromAZ('AD') - 1: + cursor = connection.cursor() + sql = "SELECT nextval('%s_id_seq')" % self._meta.db_table + cursor.execute(sql) # this does not work if another item without imdbid has the same metadata oxdbId = self.oxdb_id()