mirror of
https://github.com/OpenSPG/openspg.git
synced 2025-12-05 03:31:07 +00:00
feat(schema): prohibit the creation of properties for concept types (#59)
This commit is contained in:
parent
e7317ef8b1
commit
03d19c4053
@ -349,8 +349,11 @@ class SPGSchemaMarkLang:
|
||||
|
||||
elif type_meta == "properties":
|
||||
assert self.parsing_register[RegisterUnit.Type].spg_type_enum not in [
|
||||
SpgTypeEnum.Standard
|
||||
], self.error_msg("Standard type does not allow defining properties.")
|
||||
SpgTypeEnum.Standard,
|
||||
SpgTypeEnum.Concept,
|
||||
], self.error_msg(
|
||||
"Standard/concept type does not allow defining properties."
|
||||
)
|
||||
self.save_register(
|
||||
RegisterUnit.Property, Property(name="_", object_type_name="Thing")
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user