mirror of
https://github.com/drygdryg/netbox-plugin-interface-sync
synced 2024-11-25 18:10:52 +03:00
Minor fixes
This commit is contained in:
parent
836d850401
commit
00cedbd589
@ -146,6 +146,10 @@ class PowerPortComparison(ParentTypedComparison):
|
||||
and (self.allocated_draw == other.allocated_draw)
|
||||
)
|
||||
|
||||
def __hash__(self):
|
||||
# Ignore some fields when hashing; ignore interface name case and whitespaces
|
||||
return hash((self.name.lower().replace(" ", ""), self.type))
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class PowerOutletComparison(ParentTypedComparison):
|
||||
|
@ -317,7 +317,7 @@ class PowerOutletComparisonView(LoginRequiredMixin, PermissionRequiredMixin, Vie
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
message.append("Dependecy detected, sync power ports first!")
|
||||
messages.error(request, "Dependecy detected, sync power ports first!")
|
||||
|
||||
if created > 0:
|
||||
message.append(f"created {created} power outlet")
|
||||
@ -450,7 +450,7 @@ class FrontPortComparisonView(LoginRequiredMixin, PermissionRequiredMixin, View)
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
message.append("Dependecy detected, sync rear ports first!")
|
||||
messages.error(request, "Dependecy detected, sync power ports first!")
|
||||
|
||||
if created > 0:
|
||||
message.append(f"created {created} front ports")
|
||||
|
Loading…
Reference in New Issue
Block a user