From 997e79a4760f2063bdae2d9287ee19bf66f48dee Mon Sep 17 00:00:00 2001 From: Terrtia Date: Tue, 21 Jan 2020 13:35:52 +0100 Subject: [PATCH] fix: [Tag core] add tag, update tag last seen --- bin/packages/Tag.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/packages/Tag.py b/bin/packages/Tag.py index 01462426..45eb75df 100755 --- a/bin/packages/Tag.py +++ b/bin/packages/Tag.py @@ -279,7 +279,7 @@ def update_tag_metadata(tag, tag_date, object_type=None, add_tag=True): ''' Update tag metadata (current: item only) ''' - if object_type=="item": + if object_type=="item": # # TODO: use another getter (get all object with date) # get object metadata tag_metadata = get_tag_metadata(tag, r_int=True) ############# @@ -396,7 +396,7 @@ def add_tag(object_type, tag, object_id, obj_date=None): obj_date = get_obj_date(object_type, object_id) add_global_tag(tag, object_type=object_type) add_obj_tag(object_type, object_id, tag, obj_date=obj_date) - update_tag_metadata(tag, obj_date) + update_tag_metadata(tag, obj_date, object_type=object_type) # create tags stats # # TODO: put me in cache r_serv_tags.hincrby('daily_tags:{}'.format(datetime.date.today().strftime("%Y%m%d")), tag, 1)