Skip to content

Commit

Permalink
feat: has_no_sessions() method on Study model
Browse files Browse the repository at this point in the history
  • Loading branch information
EdoStorm96 committed Mar 28, 2024
1 parent 21995ff commit 075e352
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions studies/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ def has_missing_sessions(self):

return False

def has_no_sessions(self):
return self.has_sessions and self.sessions_number == 0

def research_settings_contains_schools(self):
"""Checks if any research track contains a school in it's setting"""
if self.has_intervention and self.intervention.settings_contains_schools():
Expand Down

0 comments on commit 075e352

Please sign in to comment.