Skip to content

Commit c73cc0a

Browse files
arthansonjeremystretch
authored andcommitted
18500 fix check for cloning mixin
1 parent 6b9b66a commit c73cc0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

netbox/utilities/querydict.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from django.http import QueryDict
44
from django.utils.datastructures import MultiValueDict
5+
from netbox.models import CloningMixin
56

67
__all__ = (
78
'dict_to_querydict',
@@ -46,7 +47,7 @@ def prepare_cloned_fields(instance):
4647
Generate a QueryDict comprising attributes from an object's clone() method.
4748
"""
4849
# Generate the clone attributes from the instance
49-
if not hasattr(instance, 'clone'):
50+
if not issubclass(type(instance), CloningMixin):
5051
return QueryDict(mutable=True)
5152
attrs = instance.clone()
5253

0 commit comments

Comments
 (0)