Skip to content

Commit

Permalink
better check for working copy support: test for feature instead of te…
Browse files Browse the repository at this point in the history
…sting for version
  • Loading branch information
davisagli committed Jan 25, 2025
1 parent f008f0c commit c6676de
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plone/restapi/serializer/dxcontent.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ def update_with_working_copy_info(context, result):
if WorkingCopyInfo is None:
return

# Does not return working copy information when serializing Portal in Plone 5.2.
if not HAS_PLONE_6 and context.portal_type == "Plone Site":
return

working_copy_info = WorkingCopyInfo(context)
baseline, working_copy = working_copy_info.get_working_copy_info()
try:
baseline, working_copy = working_copy_info.get_working_copy_info()
except TypeError:
# not supported for this content type
return
result.update({"working_copy": working_copy, "working_copy_of": baseline})


Expand Down

0 comments on commit c6676de

Please sign in to comment.