mirror of
https://github.com/veops/cmdb.git
synced 2025-08-08 22:04:04 +08:00
fix jwt decode
This commit is contained in:
@@ -40,7 +40,9 @@ class CITypeManager(object):
|
||||
|
||||
@staticmethod
|
||||
def check_is_existed(key):
|
||||
return CITypeCache.get(key) or abort(404, "CIType <{0}> is not existed".format(key))
|
||||
ci_type = CITypeCache.get(key) or abort(404, "CIType <{0}> is not existed".format(key))
|
||||
|
||||
return CIType.get_by_id(ci_type.id)
|
||||
|
||||
@staticmethod
|
||||
def get_ci_types(type_name=None):
|
||||
@@ -65,6 +67,9 @@ class CITypeManager(object):
|
||||
else:
|
||||
return
|
||||
|
||||
if not ci_type:
|
||||
return
|
||||
|
||||
if type_id is not None and ci_type.id != type_id:
|
||||
return abort(400, "CIType <{0}> is already existed".format(name or alias))
|
||||
|
||||
|
Reference in New Issue
Block a user