From a9529f3e4c9165ca0e8528660d076651f5192a2c Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Fri, 25 Jul 2025 17:55:54 +0300 Subject: [PATCH] fix --- bots/modules/channel_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/modules/channel_helper.py b/bots/modules/channel_helper.py index 776ecd6..01e4fff 100644 --- a/bots/modules/channel_helper.py +++ b/bots/modules/channel_helper.py @@ -56,7 +56,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): im = Image.open(f) # type: Image.Image image_hash = imagehash.phash(im) - if self.queued_items.filter(image_hash=image_hash, type='photo').count() > 0: + if self.queued_items.filter(image_hash=str(image_hash), type='photo').count() > 0: return 'duplicate' width, height = im.size @@ -72,7 +72,7 @@ class ChannelHelperBotModuleConfig(TelegramBotModuleConfig): # else: # bot.send_photo(self.chat_id, open(fpath, 'rb')) # QueuedItem.objects.create(config=self, type='photo', args=json.dumps([]), image_hash=image_hash, processed=True) - return image_hash + return str(image_hash) def rpc_post_gif(self, url, note=''): config._reload_maybe()