mirror of
https://github.com/OCA/knowledge.git
synced 2025-08-28 10:16:13 -06:00
fix DeprecationWarning: Overriding 'resolve'
This commit is contained in:
parent
baa5e3bed4
commit
9bbe983207
@ -21,8 +21,8 @@ try:
|
||||
name_re = re.compile("^%s$" % old_name_re.pattern)
|
||||
|
||||
class Context(SandboxedEnvironment.context_class):
|
||||
def resolve(self, key):
|
||||
res = super().resolve(key)
|
||||
def resolve_or_missing(self, key):
|
||||
res = super().resolve_or_missing(key)
|
||||
if not isinstance(res, Undefined):
|
||||
return res
|
||||
return self.parent["ref"](key)
|
||||
|
Loading…
Reference in New Issue
Block a user