mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Change CablePath.path to JSONField
This commit is contained in:
@ -10,7 +10,6 @@ from .lookups import PathContains
|
||||
__all__ = (
|
||||
'ASNField',
|
||||
'MACAddressField',
|
||||
'MultiNodePathField',
|
||||
'PathField',
|
||||
'WWNField',
|
||||
)
|
||||
@ -105,16 +104,4 @@ class PathField(ArrayField):
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class MultiNodePathField(ArrayField):
|
||||
"""
|
||||
A two-dimensional ArrayField which represents a path, with one or more nodes at each hop. Each node is
|
||||
identified by a (type, ID) tuple.
|
||||
"""
|
||||
def __init__(self, **kwargs):
|
||||
kwargs['base_field'] = ArrayField(
|
||||
base_field=models.CharField(max_length=40)
|
||||
)
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
PathField.register_lookup(PathContains)
|
||||
|
Reference in New Issue
Block a user