Skip to content

Commit

Permalink
Change min diameter to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Polo authored and lucaspolo committed Sep 19, 2019
1 parent 2603e97 commit d25b27a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions correios/models/posting.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ def length(self, length):

@property
def diameter(self) -> int:
if self.package_type != Package.TYPE_CYLINDER:
return 0
return max(MIN_DIAMETER, int(math.ceil(self.real_diameter)))

@diameter.setter
Expand Down

0 comments on commit d25b27a

Please sign in to comment.