Skip to content

Commit

Permalink
set models to private (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreng authored Apr 1, 2024
1 parent c00b8c2 commit 23428c8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions netbox_topology_views/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class Meta:

__role: Optional[Role] = None

_netbox_private = True

@property
def role(self) -> Role:
if self.__role:
Expand Down Expand Up @@ -111,6 +113,8 @@ class CoordinateGroup(NetBoxModel):
blank = True,
)

_netbox_private = True

class Meta:
ordering = ['name']

Expand Down Expand Up @@ -138,6 +142,8 @@ class Coordinate(NetBoxModel):
'Smaller values correspond to a position further up on the monitor.',
)

_netbox_private = True

def get_or_create_default_group(group_id):
# Default group named "default" must always exist in order to make sure
# that coordinate values can be stored even if no coordinate group has been
Expand Down Expand Up @@ -187,6 +193,8 @@ class CircuitCoordinate(NetBoxModel):
'Smaller values correspond to a position further up on the monitor.',
)

_netbox_private = True

def get_or_create_default_group(group_id):
# Default group named "default" must always exist in order to make sure
# that coordinate values can be stored even if no coordinate group has been
Expand Down Expand Up @@ -236,6 +244,8 @@ class PowerPanelCoordinate(NetBoxModel):
'Smaller values correspond to a position further up on the monitor.',
)

_netbox_private = True

def get_or_create_default_group(group_id):
# Default group named "default" must always exist in order to make sure
# that coordinate values can be stored even if no coordinate group has been
Expand Down Expand Up @@ -285,6 +295,8 @@ class PowerFeedCoordinate(NetBoxModel):
'Smaller values correspond to a position further up on the monitor.',
)

_netbox_private = True

def get_or_create_default_group(group_id):
# Default group named "default" must always exist in order to make sure
# that coordinate values can be stored even if no coordinate group has been
Expand Down Expand Up @@ -387,5 +399,7 @@ class IndividualOptions(NetBoxModel):
default=False
)

_netbox_private = True

def __str___(self):
return f"{self.user_id}"

0 comments on commit 23428c8

Please sign in to comment.