diff --git a/server/tests/author_profiles_test.py b/server/tests/author_profiles_test.py index 0430eb6..152a79c 100644 --- a/server/tests/author_profiles_test.py +++ b/server/tests/author_profiles_test.py @@ -199,6 +199,7 @@ "enabled": True, "required": True, }, + "profile_id": None, }, "schema": { "slugline": { @@ -207,6 +208,7 @@ "maxlength": 24, "nullable": False, }, + "profile_id": None, }, }, { diff --git a/server/tga/author_profiles.py b/server/tga/author_profiles.py index 83f4d68..e4655b6 100644 --- a/server/tga/author_profiles.py +++ b/server/tga/author_profiles.py @@ -32,7 +32,7 @@ def _get_content_profile_custom_fields(original: Dict[str, Any]) -> List[Dict[st return [ field for field in get_resource_service("vocabularies").get_extra_fields() - if field["_id"] in content_profile["schema"].keys() + if (content_profile["editor"].get(field["_id"]) or {}).get("enabled") ]