Skip to content

Commit e7aa510

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

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

coderdojochi/models/session.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ def save(self, *args, **kwargs):
275275
self.mentor_capacity = max(self.mentor_capacity, 0)
276276

277277
# Capacity check
278+
if self.capacity is None:
279+
self.capacity = 0
278280
self.capacity = max(self.capacity, 0)
279281

280282
super(Session, self).save(*args, **kwargs)

0 commit comments

Comments
 (0)