forked from p15670423/monkey
Island: Make machine model hashable
Machines can be hashed based on their ID. This allows us to add them to set for example and make sure no duplicate entries are there
This commit is contained in:
parent
f0f858eba5
commit
9a82e46799
|
@ -38,3 +38,6 @@ class Machine(MutableInfectionMonkeyBaseModel):
|
||||||
_make_immutable_sequence = validator("network_interfaces", pre=True, allow_reuse=True)(
|
_make_immutable_sequence = validator("network_interfaces", pre=True, allow_reuse=True)(
|
||||||
make_immutable_sequence
|
make_immutable_sequence
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return self.id
|
||||||
|
|
Loading…
Reference in New Issue