Skip to content

Commit 8e8afaf

Browse files
committed
fix conflict
1 parent 469d815 commit 8e8afaf

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/py_avro_schema/_schemas.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,9 @@ def _wrap_as_record(self, inner_schema: JSONObj, names: NamesType) -> JSONType:
308308
Handles deduplication via ``names``.
309309
"""
310310
record_name = _avro_name_for_type(_type_from_annotated(self.py_type))
311-
fullname = f"{self.namespace}.{record_name}" if self.namespace else record_name
312-
if fullname in names:
313-
return fullname
314-
names.append(fullname)
311+
if record_name in names:
312+
return record_name
313+
names.append(record_name)
315314

316315
fields = [
317316
{"name": REF_ID_KEY, "type": ["null", "long"], "default": None},
@@ -325,9 +324,6 @@ def _wrap_as_record(self, inner_schema: JSONObj, names: NamesType) -> JSONType:
325324
"name": record_name,
326325
"fields": fields,
327326
}
328-
329-
if self.namespace:
330-
record_schema["namespace"] = self.namespace
331327
return record_schema
332328

333329

0 commit comments

Comments
 (0)