Skip to content

Commit

Permalink
Merge pull request #28 from Safe/fmeengine-82987
Browse files Browse the repository at this point in the history
ContainerContentResponse: omit CONTINUE if there's no pagination info
  • Loading branch information
carsonyl authored and GitHub Enterprise committed Jun 3, 2024
2 parents d785462 + 464fdb8 commit 6110aac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# fmetools changes

## 0.9.2

* In `fmetools.scripted_selection.ContainerContentResponse`,
omit `CONTINUE` key if there's no pagination info.

## 0.9.1

* Allow ScriptedSelectionCallback subclasses to omit constructor.
Expand Down
2 changes: 1 addition & 1 deletion src/fmetools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding: utf-8

__version__ = "0.9.1"
__version__ = "0.9.2"

import gettext
import os
Expand Down
6 changes: 5 additions & 1 deletion src/fmetools/scripted_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,14 @@ def pagination(self) -> Optional[PaginationInfo]:
needed to request the next page of results.
The arguments are added to the next call to :meth:`ScriptedSelectionCallback.get_container_contents`.
"""
return self["CONTINUE"]
return self.get("CONTINUE")

@pagination.setter
def pagination(self, value: Optional[PaginationInfo]) -> None:
if not value:
# In FME <2024, key presence means there's a next page.
self.pop("CONTINUE", None)
return
self["CONTINUE"] = value

@property
Expand Down

0 comments on commit 6110aac

Please sign in to comment.