Skip to content

Commit

Permalink
Add missing docs link for GeneratorDefinition/GeneratorInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasG0 committed Sep 23, 2024
1 parent 68c5d76 commit 8b197bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions backend/infrahub/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,9 +513,7 @@ def diff(self, other: Self) -> HashableModelDiff:
in_both, local_only, other_only = compare_lists(
list1=list(self.model_fields.keys()), list2=list(other.model_fields.keys())
)
diff_result = HashableModelDiff(
added={item: None for item in local_only}, removed={item: None for item in other_only}
)
diff_result = HashableModelDiff(added=dict.fromkeys(local_only), removed=dict.fromkeys(other_only))

for field_name in in_both:
if field_name.startswith("_") or field_name in self._exclude_from_hash:
Expand Down
4 changes: 2 additions & 2 deletions backend/infrahub/core/schema/basenode_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ def _diff_element(

elements_diff = HashableModelDiff()
if present_local:
elements_diff.added = {name: None for name in present_local}
elements_diff.added = dict.fromkeys(present_local)
if present_other:
elements_diff.removed = {name: None for name in present_other}
elements_diff.removed = dict.fromkeys(present_other)

# Process element b
for name in sorted(present_both):
Expand Down
2 changes: 2 additions & 0 deletions backend/infrahub/core/schema/definitions/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,7 @@
"uniqueness_constraints": [["name__value"]],
"generate_profile": False,
"inherit_from": [InfrahubKind.TASKTARGET],
"documentation": "/topics/generator",
"attributes": [
{"name": "name", "kind": "Text", "unique": True},
{"name": "description", "kind": "Text", "optional": True},
Expand Down Expand Up @@ -1848,6 +1849,7 @@
"branch": BranchSupportType.LOCAL.value,
"generate_profile": False,
"inherit_from": [InfrahubKind.TASKTARGET],
"documentation": "/topics/generator",
"attributes": [
{"name": "name", "kind": "Text"},
{
Expand Down

0 comments on commit 8b197bf

Please sign in to comment.