Skip to content

Commit bfc678f

Browse files
committed
updates
1 parent a84a011 commit bfc678f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

changes/1169.fixed

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Fixed bug in `DiffSyncModelUtilityMixin.get_attr_args()` for Annoted type hints wrapped in `Optional[]` tag.
1+
Fixed bug in `DiffSyncModelUtilityMixin.get_attr_args()` for Annoted type hints wrapped in `Optional[]` tag.
2+
Fix hashing issue on Custom Annotations.

nautobot_ssot/contrib/types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@
99
from nautobot_ssot.contrib.enums import RelationshipSideEnum
1010

1111

12+
1213
class CustomAnnotation:
1314
"""Base class used to identify custom annotations in SSoT operations."""
1415

16+
def __hash__(self):
17+
"""Return a hash of the class instance."""
18+
return hash(frozenset({"class": self.__class__} | self.__dict__))
19+
1520

1621
@dataclass
1722
class CustomRelationshipAnnotation(CustomAnnotation):

0 commit comments

Comments
 (0)