Skip to content

Commit 3e09b85

Browse files
committed
Remove read_only attribute from mandatory_attribute_names
1 parent 0772e3e commit 3e09b85

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

infrahub_sdk/schema/main.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,11 @@ def mandatory_input_names(self) -> list[str]:
231231

232232
@property
233233
def mandatory_attribute_names(self) -> list[str]:
234-
return [item.name for item in self.attributes if not item.optional and item.default_value is None]
234+
return [
235+
item.name
236+
for item in self.attributes
237+
if (not item.optional and item.default_value is None) and not item.read_only
238+
]
235239

236240
@property
237241
def mandatory_relationship_names(self) -> list[str]:

0 commit comments

Comments
 (0)