Skip to content

Commit 1690e2a

Browse files
committed
Post-rebase fix: entity type attribute _name instead of name #59
1 parent ad64f8f commit 1690e2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

objectbox/model/entity.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ def wrapper(class_):
296296

297297
entity_type = _Entity(class_, uid)
298298
for existing in types:
299-
if existing.name == entity_type.name:
299+
if existing._name == entity_type._name:
300300
# OK for tests, where multiple models are created with the same entity name
301-
logging.warning(f"Model \"{model}\" already contains an entity type \"{entity_type.name}\"; replacing it.")
301+
logging.warning(f"Model \"{model}\" already contains an entity type \"{entity_type._name}\"; replacing it.")
302302
types.remove(existing)
303303
break
304304

305305
obx_models_by_name[model].append(entity_type)
306-
logging.info(f"Entity type {entity_type.name} added to model {model}")
306+
logging.info(f"Entity type {entity_type._name} added to model {model}")
307307
return entity_type
308308

309309
return wrapper

0 commit comments

Comments
 (0)