perf(api): auto discovery (#582)

This commit is contained in:
pycook
2024-07-25 17:45:26 +08:00
committed by GitHub
parent 5050a1bef5
commit 175778a162
11 changed files with 328 additions and 93 deletions

View File

@@ -229,7 +229,7 @@ class AttributeManager(object):
is_choice = True if choice_value or kwargs.get('choice_web_hook') or kwargs.get('choice_other') else False
name = kwargs.pop("name")
if name in BUILTIN_KEYWORDS:
if name in BUILTIN_KEYWORDS or kwargs.get('alias') in BUILTIN_KEYWORDS:
return abort(400, ErrFormat.attribute_name_cannot_be_builtin)
while kwargs.get('choice_other'):