mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 09:47:17 +00:00
fix: [Tag core] check if item_date type is an integer
This commit is contained in:
parent
b63fa51166
commit
727bc55966
1 changed files with 5 additions and 0 deletions
|
@ -392,6 +392,11 @@ def add_tag(object_type, tag, object_id, obj_date=None):
|
||||||
# new tag
|
# new tag
|
||||||
if not is_obj_tagged(object_id, tag):
|
if not is_obj_tagged(object_id, tag):
|
||||||
# # TODO: # FIXME: sanityze object_type
|
# # TODO: # FIXME: sanityze object_type
|
||||||
|
if obj_date:
|
||||||
|
try:
|
||||||
|
obj_date = int(obj_date)
|
||||||
|
except:
|
||||||
|
obj_date = None
|
||||||
if not obj_date:
|
if not obj_date:
|
||||||
obj_date = get_obj_date(object_type, object_id)
|
obj_date = get_obj_date(object_type, object_id)
|
||||||
add_global_tag(tag, object_type=object_type)
|
add_global_tag(tag, object_type=object_type)
|
||||||
|
|
Loading…
Reference in a new issue