Skip to content

Commit 8b04d48

Browse files
karbassiCopilot
andauthored
Update coderdojochi/models/session.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 07afc89 commit 8b04d48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

coderdojochi/models/session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def save(self, *args, **kwargs):
272272
if self.mentor_capacity is None:
273273
self.mentor_capacity = int(self.capacity / 2)
274274

275-
self.mentor_capacity = max(self.mentor_capacity, 0)
275+
self.mentor_capacity = max(self.mentor_capacity if self.mentor_capacity is not None else 0, 0)
276276

277277
# Capacity check
278278
if self.capacity is None:

0 commit comments

Comments
 (0)