Skip to content

Commit 24085f9

Browse files
committed
fix GET /auth/users/drafts/
1 parent ef61429 commit 24085f9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

projects/models.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from typing import Optional
2+
13
from django.contrib.auth import get_user_model
24
from django.db import models
35
from django.db.models import UniqueConstraint
@@ -63,8 +65,8 @@ class Project(models.Model):
6365

6466
objects = ProjectManager()
6567

66-
def get_short_description(self):
67-
return self.description[:30]
68+
def get_short_description(self) -> Optional[str]:
69+
return self.description[:30] if self.description else None
6870

6971
def __str__(self):
7072
return f"Project<{self.id}> - {self.name}"

0 commit comments

Comments
 (0)