Skip to content

Commit

Permalink
fix: repaired RelatedDocument is_downref and is_approved_downref methods
Browse files Browse the repository at this point in the history
  • Loading branch information
rjsparks committed Jul 7, 2023
1 parent 3e57b9e commit 632293d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ietf/doc/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ def is_downref(self):
if source_lvl not in ['bcp','ps','ds','std']:
return None

if self.target.document.get_state().slug == 'rfc':
if self.target.document.type_id == 'rfc':
if not self.target.document.std_level:
target_lvl = 'unkn'
else:
Expand All @@ -709,8 +709,8 @@ def is_downref(self):

def is_approved_downref(self):

if self.target.document.get_state().slug == 'rfc':
if RelatedDocument.objects.filter(relationship_id='downref-approval', target=self.target):
if self.target.document.type_id == "rfc":
if RelatedDocument.objects.filter(relationship_id='downref-approval', target=self.target).exists():
return "Approved Downref"

return False
Expand Down

0 comments on commit 632293d

Please sign in to comment.