From 727bc5596691da467d9585e205a2a7d183c64506 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Thu, 30 Jan 2020 11:31:33 +0100 Subject: [PATCH] fix: [Tag core] check if item_date type is an integer --- bin/packages/Tag.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/packages/Tag.py b/bin/packages/Tag.py index b8394b34..03b9c990 100755 --- a/bin/packages/Tag.py +++ b/bin/packages/Tag.py @@ -392,6 +392,11 @@ def add_tag(object_type, tag, object_id, obj_date=None): # new tag if not is_obj_tagged(object_id, tag): # # TODO: # FIXME: sanityze object_type + if obj_date: + try: + obj_date = int(obj_date) + except: + obj_date = None if not obj_date: obj_date = get_obj_date(object_type, object_id) add_global_tag(tag, object_type=object_type)