Skip to content

Commit

Permalink
fix: use the intended state machine in person doc searches
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Feb 24, 2023
1 parent f70ce3e commit cec8df0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ietf/person/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ def rfcs(self):

def active_drafts(self):
from ietf.doc.models import Document
return Document.objects.filter(documentauthor__person=self, type='draft', states__slug='active').distinct().order_by('-time')
return Document.objects.filter(documentauthor__person=self, type='draft', states__type='draft', states__slug='active').distinct().order_by('-time')

def expired_drafts(self):
from ietf.doc.models import Document
return Document.objects.filter(documentauthor__person=self, type='draft', states__slug__in=['repl', 'expired', 'auth-rm', 'ietf-rm']).distinct().order_by('-time')
return Document.objects.filter(documentauthor__person=self, type='draft', states__type='draft', states__slug__in=['repl', 'expired', 'auth-rm', 'ietf-rm']).distinct().order_by('-time')


def save(self, *args, **kwargs):
Expand Down

0 comments on commit cec8df0

Please sign in to comment.