mirror of
https://github.com/OCA/knowledge.git
synced 2025-08-28 10:16:13 -06:00
fix unit tests
This commit is contained in:
parent
9bbe983207
commit
f74bf47e70
@ -23,9 +23,12 @@ try:
|
||||
class Context(SandboxedEnvironment.context_class):
|
||||
def resolve_or_missing(self, key):
|
||||
res = super().resolve_or_missing(key)
|
||||
if not isinstance(res, Undefined):
|
||||
if res is not Undefined:
|
||||
return res
|
||||
try:
|
||||
return self.parent["ref"](key)
|
||||
except KeyError:
|
||||
return Undefined()
|
||||
|
||||
class Environment(SandboxedEnvironment):
|
||||
context_class = Context
|
||||
|
Loading…
Reference in New Issue
Block a user