Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
leshchenko1979 committed Mar 23, 2024
1 parent 6462b68 commit 65ca05e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions fast_bitrix24/user_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,18 @@ def check_special_limitations(self):
stacklevel=get_warning_stack_level(TOP_MOST_LIBRARY_MODULES),
)

if "LIMIT" in self.st_params:
if self.st_params and "LIMIT" in self.st_params:
warnings.warn(

Check warning on line 135 in fast_bitrix24/user_request.py

View check run for this annotation

Codecov / codecov/patch

fast_bitrix24/user_request.py#L135

Added line #L135 was not covered by tests
"Bitrix servers don't seem to support the 'LIMIT' parameter.",
UserWarning,
stacklevel=get_warning_stack_level(TOP_MOST_LIBRARY_MODULES),
)

if "SELECT" in self.st_params and "*" in self.st_params["SELECT"]:
if (
self.st_params
and "SELECT" in self.st_params
and "*" in self.st_params["SELECT"]
):
warnings.warn(

Check warning on line 146 in fast_bitrix24/user_request.py

View check run for this annotation

Codecov / codecov/patch

fast_bitrix24/user_request.py#L146

Added line #L146 was not covered by tests
"You are selecting all fields. Beware that this is time-consuming and "
"may lead to penalties from the Bitrix server.",
Expand Down

0 comments on commit 65ca05e

Please sign in to comment.