Skip to content

Commit 008eaf7

Browse files
committed
Modified the run_yang_model_checks management command to accept document aliases on the command line.
- Legacy-Id: 14443
1 parent ff5480b commit 008eaf7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/utils/management/commands/run_yang_model_checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import debug # pyflakes:ignore
1111

12-
from ietf.doc.models import Document, State
12+
from ietf.doc.models import Document, State, DocAlias
1313
from ietf.submit.models import Submission, SubmissionCheck
1414
from ietf.submit.checkers import DraftYangChecker
1515

@@ -75,7 +75,7 @@ def handle(self, *filenames, **options):
7575
parts = name.rsplit('-',1)
7676
if len(parts)==2 and len(parts[1])==2 and parts[1].isdigit():
7777
name = parts[0]
78-
draft = Document.objects.get(name=name)
78+
draft = DocAlias.objects.get(name=name).document
7979
self.check_yang(checker, draft, force=True)
8080
else:
8181
for draft in Document.objects.filter(states=active_state, type_id='draft'):

0 commit comments

Comments
 (0)