fix: [tag core] item date type

This commit is contained in:
Terrtia 2020-01-21 15:23:59 +01:00
parent f82c934406
commit 249b3d657f
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -196,8 +196,8 @@ def get_tag_metadata(tag, r_int=False):
Get tag metadata (current: item only) Get tag metadata (current: item only)
''' '''
tag_metadata = {"tag": tag} tag_metadata = {"tag": tag}
tag_metadata['first_seen'] = get_tag_first_seen(tag) tag_metadata['first_seen'] = get_tag_first_seen(tag, r_int=r_int)
tag_metadata['last_seen'] = get_tag_last_seen(tag) tag_metadata['last_seen'] = get_tag_last_seen(tag, r_int=r_int)
return tag_metadata return tag_metadata
def get_tags_min_last_seen(l_tags, r_int=False): def get_tags_min_last_seen(l_tags, r_int=False):
@ -563,6 +563,6 @@ def get_obj_by_tags(object_type, l_tags, date_from=None, date_to=None, nb_obj=50
def get_obj_date(object_type, object_id): # # TODO: move me in another file def get_obj_date(object_type, object_id): # # TODO: move me in another file
if object_type == "item": if object_type == "item":
return Item.get_item_date(object_id) return int(Item.get_item_date(object_id))
else: else:
return None return None