Skip to content

Commit 8b197bf

Browse files
committed
Add missing docs link for GeneratorDefinition/GeneratorInstance
1 parent 68c5d76 commit 8b197bf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/infrahub/core/models.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,9 +513,7 @@ def diff(self, other: Self) -> HashableModelDiff:
513513
in_both, local_only, other_only = compare_lists(
514514
list1=list(self.model_fields.keys()), list2=list(other.model_fields.keys())
515515
)
516-
diff_result = HashableModelDiff(
517-
added={item: None for item in local_only}, removed={item: None for item in other_only}
518-
)
516+
diff_result = HashableModelDiff(added=dict.fromkeys(local_only), removed=dict.fromkeys(other_only))
519517

520518
for field_name in in_both:
521519
if field_name.startswith("_") or field_name in self._exclude_from_hash:

backend/infrahub/core/schema/basenode_schema.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ def _diff_element(
143143

144144
elements_diff = HashableModelDiff()
145145
if present_local:
146-
elements_diff.added = {name: None for name in present_local}
146+
elements_diff.added = dict.fromkeys(present_local)
147147
if present_other:
148-
elements_diff.removed = {name: None for name in present_other}
148+
elements_diff.removed = dict.fromkeys(present_other)
149149

150150
# Process element b
151151
for name in sorted(present_both):

backend/infrahub/core/schema/definitions/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,6 +1801,7 @@
18011801
"uniqueness_constraints": [["name__value"]],
18021802
"generate_profile": False,
18031803
"inherit_from": [InfrahubKind.TASKTARGET],
1804+
"documentation": "/topics/generator",
18041805
"attributes": [
18051806
{"name": "name", "kind": "Text", "unique": True},
18061807
{"name": "description", "kind": "Text", "optional": True},
@@ -1848,6 +1849,7 @@
18481849
"branch": BranchSupportType.LOCAL.value,
18491850
"generate_profile": False,
18501851
"inherit_from": [InfrahubKind.TASKTARGET],
1852+
"documentation": "/topics/generator",
18511853
"attributes": [
18521854
{"name": "name", "kind": "Text"},
18531855
{

0 commit comments

Comments
 (0)