Skip to content

Commit d967cae

Browse files
committed
fix issue 601
1 parent dd31840 commit d967cae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

jsonschema/_validators.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ def ref(validator, ref, instance, schema):
257257
yield error
258258
else:
259259
scope, resolved = validator.resolver.resolve(ref)
260-
validator.resolver.push_scope(scope)
260+
if "#" in ref:
261+
validator.resolver.push_scope(scope)
262+
else:
263+
validator.resolver.push_scope(str(scope).replace(ref, ""))
261264

262265
try:
263266
for error in validator.descend(instance, resolved):

0 commit comments

Comments
 (0)