Fix template IDs in a couple more places

This commit is contained in:
James Westman 2023-05-16 18:47:07 -05:00
parent 3ebe5c72c1
commit c95195197d
2 changed files with 18 additions and 28 deletions

View file

@ -26,6 +26,10 @@ from .contexts import ScopeCtx
class Widget(AstNode):
grammar = UseIdent("name")
@property
def name(self) -> str:
return self.tokens["name"]
@validate("name")
def obj_widget(self):
object = self.context[ScopeCtx].objects.get(self.tokens["name"])