clean app

This commit is contained in:
Louis Mazin 2026-09-25 18:35:16 +02:00
parent 9008ba2c18
commit 19173d1e0c
4 changed files with 36 additions and 1427 deletions

View File

@ -26,7 +26,8 @@ def can_complete_note(user, note):
return False return False
return ( return (
is_admin(user) (note.is_public and not note.recipients.exists())
or is_admin(user)
or note.author_id == user.id or note.author_id == user.id
or note.recipients.filter( or note.recipients.filter(
pk=user.pk, pk=user.pk,

View File

@ -113,7 +113,8 @@ class NoteListView(
elif scope == 'to_me': elif scope == 'to_me':
notes = notes.filter( notes = notes.filter(
recipients=self.request.user, Q(is_public=True, recipients__isnull=True)
| Q(recipients=self.request.user),
) )
elif scope != 'all': elif scope != 'all':

File diff suppressed because it is too large Load Diff