Skip to content

Commit 1fe184e

Browse files
committed
Explicit default values
1 parent c486fab commit 1fe184e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ninja/pagination.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ class Cursor(BaseModel):
237237
"""
238238

239239
p: Optional[str] = Field(
240-
None,
240+
default=None,
241241
title="position",
242242
description="String identifier for the current position in the dataset",
243243
)
244244

245245
r: bool = Field(
246-
False,
246+
default=False,
247247
title="reverse",
248248
description="Whether to reverse the ordering direction",
249249
)
@@ -252,7 +252,7 @@ class Cursor(BaseModel):
252252
# e.g. if created time of two items is exactly the same, we can use the offset
253253
# to figure out the position exactly
254254
o: int = Field(
255-
0,
255+
default=0,
256256
ge=0,
257257
lt=settings.PAGINATION_MAX_OFFSET,
258258
title="offset",

0 commit comments

Comments
 (0)