Skip to content

Commit 1d4687a

Browse files
committed
fix canvas -1 for api pixels
1 parent f3a29ea commit 1d4687a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

placedump/api/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ async def get_pixel_history(
5656
):
5757
"""Get the history of pixels in a location or by author.
5858
59+
canvas_id can be set to -1 to get results for all canvases.
60+
5961
This call accepts positions with X, Y coordinates, without a canvas.
6062
6163
This call accepts positions with X, Y coordinates in specific canvases.
@@ -91,7 +93,7 @@ async def get_pixel_history(
9193
filter_query = filter_query.filter(Pixel.modified >= timestamp)
9294

9395
# Canvas
94-
if canvas_id is not None:
96+
if canvas_id is not None and canvas_id != -1:
9597
count_query = count_query.filter(Pixel.board_id == canvas_id)
9698
filter_query = filter_query.filter(Pixel.board_id == canvas_id)
9799

0 commit comments

Comments
 (0)