Skip to content

Commit

Permalink
#268 oncall: review fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davydov-d committed Jun 10, 2022
1 parent 1812fa0 commit bc0f7ab
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,14 @@ def split_properties(properties_list: List[str]) -> Iterator[Tuple[str]]:
summary_length = 0
local_properties = []
for property_ in properties_list:
if len(urllib.parse.quote(f"property={property_}&")) + summary_length >= PROPERTIES_PARAM_MAX_LENGTH:
current_property_length = len(urllib.parse.quote(f"property={property_}&"))
if current_property_length + summary_length >= PROPERTIES_PARAM_MAX_LENGTH:
yield local_properties
local_properties = []
summary_length = 0

local_properties.append(property_)
summary_length += len(urllib.parse.quote(f"property={property_}&"))
summary_length += current_property_length

if local_properties:
yield local_properties
Expand Down

0 comments on commit bc0f7ab

Please sign in to comment.