Skip to content

Commit

Permalink
Undeprecate token param on vocabularies endpoint (#1708)
Browse files Browse the repository at this point in the history
  • Loading branch information
tisto committed Sep 21, 2023
1 parent 863d9a2 commit 3e3f58a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions news/1697.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Undeprecate token parameter from vocabularies endpoint @tisto
8 changes: 2 additions & 6 deletions src/plone/restapi/serializer/vocabularies.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
from zope.schema.interfaces import ITokenizedTerm
from zope.schema.interfaces import IVocabulary

import warnings


@implementer(ISerializeToJson)
class SerializeVocabLikeToJson:
Expand Down Expand Up @@ -44,10 +42,8 @@ def __call__(self, vocabulary_id):
)

if token:
warnings.warn(
"``token`` parameter is deprecated and will be removed in plone.restapi 9.0. Use ``tokens`` parameter instead.",
DeprecationWarning,
)
# the token parameter was deprecated in plone.restapi 8
# undeprecated in plone.restapi 9
if token.lower() != term.token.lower():
continue
terms.append(term)
Expand Down

0 comments on commit 3e3f58a

Please sign in to comment.