From d61ecaac664da0f9a403f7f619b626ec00676b1c Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 18 Aug 2025 09:40:49 +0100 Subject: [PATCH] Enhance check_user_can_edit method with detailed docstring for clarity --- atlas/models.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/atlas/models.py b/atlas/models.py index 2bd8a2a1..3dcb8b04 100644 --- a/atlas/models.py +++ b/atlas/models.py @@ -549,7 +549,15 @@ class Case(models.Model, AuthorMixin, QuestionMixin): return size - def check_user_can_edit(self, user): + def check_user_can_edit(self, user) -> bool: + """Check if the user can edit the case. + + Args: + user (User): The user to check. + + Returns: + bool: True if the user can edit the case, False otherwise. + """ if user.is_superuser: return True